data.frame without ruining column names

前端 未结 2 1562
借酒劲吻你
借酒劲吻你 2020-11-27 22:39

Is there a way to use data.frame without it ruining the column names?

I have following structure:

$`Canon PowerShot`
[1] 9.997803e-01 9.997318e-01 3         


        
2条回答
  •  我在风中等你
    2020-11-27 22:47

    You can stop R changing the names to syntatically valid names by setting check.names = FALSE. See ?data.frame for details.

    # assuming your data is in a list called my_list
    do.call(data.frame, c(my_list, check.names = FALSE))
    

提交回复
热议问题