I have the following data ( with variable number of columns)
> df1<-data.frame(F1=c(1,5,"NA",9),F2=c(2,5,"a","NA"),F3=c(1,"NA","o","NA"))
> df1
F1 F2 F3
1 1 2 1
2 5 5 NA
3 NA a o
4 9 NA NA
and I want to remove the NA cells from the rows and shrink the columns only to the cells with information in it.
> df2
F1 F2 F3
1 1 2 1
2 5 5
3 a o
4 9
Thanks!