list output truncated - How to expand listed variables with str() in R

后端 未结 2 1600
天命终不由人
天命终不由人 2020-12-23 09:46

I have a data.frame df with 600+ variables. I\'m writing a function that automates the creation of columns and need to visually check them once.

The

2条回答
  •  不知归路
    2020-12-23 10:12

    By using argument list.len one can choose the number of variables in the data frame to list. There are two options:

    a) You choose the number of variables that you want to list;

    str(df, list.len = 602) # in this case I'm listing 602 variables.
    

    b) You choose to list the total number of variables of the data frame (as mentioned by user1981275);

    str(df, list.len = ncol(df))
    

    Check R help for more info

    > ?str
    

提交回复
热议问题