[R] novice questions
David Carlson
dcarlson at tamu.edu
Tue Mar 11 19:44:14 CET 2014
1. (alfa <- X*Y) # Sends the result of the expression to
print()
2. Y <- datos[,2, drop=FALSE] # see the bracket manual page:
?"["
-------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
-----Original Message-----
From: r-help-bounces at r-project.org
[mailto:r-help-bounces at r-project.org] On Behalf Of agustin
purciariello
Sent: Tuesday, March 11, 2014 10:42 AM
To: r-help at r-project.org
Subject: [R] novice questions
Good morning,
i'm new in R and i have two questions, i hope someone could help
me please:
1) For example if i put alfa<-X*Y, is there any way that when i
put "run
line on selection" (or ctrl+R) the result
appears without having to write again "alfa" and then again "run
line on
selection" to see the result?
2) When i select a column vector, for example Y<-datos[,2]
("datos" is in
spanish, it means "data"), R doesnt
recognize that column as a vector; if i put dim(Y) it says
"null". What i do
is to transplant the variable twice and put Y<-t(t(Y)), and then
R recognize
the column as a vector. Is there a way to make R recognize the
vectors as
vector in a first place (and avoid to do what i do)?
Many many thanks and sorry for my english!
Agustmn
[[alternative HTML version deleted]]
More information about the R-help
mailing list