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-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of agustin purciariello Sent: Tuesday, March 11, 2014 10:42 AM To: r-help@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]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.