Displaying 1 result from an estimated 1 matches for "indexzz".
Did you mean:
indextz
2003 Aug 06
2
(no subject)
...some rows from a dataframe. The rows correspond to
some
specific indexes which I can get by looking at the name in the first column
of my dataset. But I manage to get only the opposite of what I really want
(function #1)
#Function#1:
remove.func<-function(data){
Name<-as.character(data[,1])
indexZZ<-grep("ZZ",Name,value=FALSE)
data<-data[indexZZ,] # give me what I don't want
print(slide)
}
#Function#2:
remove.func<-function(data,Name){
Name<-as.character(data[,1])
indexZZ<-grep("ZZ",Name,value=FALSE)
data<-data[!indexZZ,] #doesn't work, give an e...