I have a simple data frame like
myframe<-data.frame(c(NA, NA,NA, 1,2,3,4,5,NA,7,8,9))
I delete the first element as follows:
myframe<-myframe[-1,]
And when I do this:
is.data.frame(myframe)
The result is:
[1] FALSE
I can fix this:
myframe<-data.frame(myframe[-1,])
but I thought that the data frame will not cease to be a data frame after deleting elements
What's going on here? I code all day, and my brain is fried, and I can't figure it out. Please, help.
My goal is to remove only the first n inputs of NA in the data frame. If they meet somewhere in the middle, it does not matter.
Thanks!
source share