How to keep a column of dataframe as dataframe

后端 未结 2 499
北荒
北荒 2021-01-18 09:53

Question: how to extract a column of dataframe and keep its structure as unchanged?

data <- iris
data[, 1] ##this will be a vector and will lose the name          


        
2条回答
提交回复
热议问题