Can anyone tell me what is skip=2, skip =7 and %in% mean here? fromcsv=read.csv ('2_2005_top200_postdoc.csv',header=FALSE,skip=7,stringsAsFactors=FALSE) fromreadxls = read.xls ('2_2005_top200_postdoc.xls',stringsAsFactors=FALSE,header=FALSE,skip=2) fromreadxls = fromreadxls[fromreadxls$V7 %in% c('Public','Private'),] Thanks!
Tung86 <wyutung <at> gmail.com> writes:> > Can anyone tell me what is skip=2, skip =7 and %in% mean here? > > fromcsv=read.csv > ('2_2005_top200_postdoc.csv',header=FALSE,skip=7,stringsAsFactors=FALSE)Did you check the docs? skip integer: the number of lines of the data file to skip before beginning to read data.> fromreadxls = fromreadxls[fromreadxls$V7 %in% c('Public','Private'),]See the documentation of "match" Dieter
Richard.Cotton at hsl.gov.uk
2009-May-11 15:54 UTC
[R] What does it mean by skip=2 and skip=7?
> Can anyone tell me what is skip=2, skip =7>From ?read.csv:"skip: integer: the number of lines of the data file to skip before beginning to read data."> and %in% mean here?%in% matches values; see ?'%in%', and example('%in%') Regards, Richie. Mathematical Sciences Unit HSL ------------------------------------------------------------------------ ATTENTION: This message contains privileged and confidential inform...{{dropped:20}}