I have a huge data frame from which I only select a couple of rows. Then I remove some of the columns based on a condition. let us say that I choose row 4460 as shown bellow
Example from mtcars
data
mydata<-mtcars
k<-mydata[1,]
mpg cyl disp hp drat wt qsec vs am gear carb
Mazda RX4 21 6 160 110 3.9 2.62 16.46 0 1 4 4
names(k)<-NULL
unlist(c(k))
[1] 21.00 6.00 160.00 110.00 3.90 2.62 16.46 0.00 1.00 4.00 4.00
Updated as per @Ananda: unlist(mydata[1, ], use.names = FALSE)