I know a few good books where this is explained. This free one for example: http://cran.r-project.org/doc/manuals/R-intro.pdf chapters 4 and 6.
Or http://rfordummies.com/ if you insist on paying for it. PS: Jeff, R is not C. different place in the alphabet and all... On Wed, Apr 2, 2014 at 2:55 AM, Sandip Nandi <sanna...@umail.iu.edu> wrote: > Hi Jeff , > > I dont think so , > > > df[[0]] > Error in .subset2(x, i, exact = exact) : > attempt to select less than one element > > > > > > df[[1]] > [1] F M M F F M F F > Levels: F M > > df[[2]] > [1] 23 25 27 29 31 33 35 37 > > Thanks > > > On Tue, Apr 1, 2014 at 5:51 PM, Jeff Johnson <mrjeffto...@gmail.com> > wrote: > > > Perhaps because indexes start at 0? > > > > Sent from my iPhone > > > > > On Apr 1, 2014, at 5:46 PM, Sandip Nandi <sanna...@umail.iu.edu> > wrote: > > > > > > Hi , > > > > > > I want to know is this behavior expected and why is that ? Need some > help > > > > > > gender <- c("F", "M", "M", "F", "F", "M", "F", "F") > > >> age <- c(23, 25, 27, 29, 31, 33, 35, 37) > > >> df<- data.frame(gender,age) > > >> typeof(df[[1]]) > > > [1] "integer" >>>>>>>>>>>>> Why is this integer . *Should not it be > > > character ?* > > >> typeof(df[[2]]) > > > [1] "double" > > > > > >> typeof(gender) > > > [1] "character" > > >> typeof(age) > > > [1] "double" > > > > > > In my code i am trying to do some thing based on typeof and the type > for > > > character column is strange. > > > > > > Thanks, > > > Sandip > > > > > > [[alternative HTML version deleted]] > > > > > > ______________________________________________ > > > R-devel@r-project.org mailing list > > > https://stat.ethz.ch/mailman/listinfo/r-devel > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Joris Meys Statistical consultant Ghent University Faculty of Bioscience Engineering Department of Mathematical Modelling, Statistics and Bio-Informatics tel : +32 9 264 59 87 joris.m...@ugent.be ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel