简体   繁体   English

我如何使数据集显示在 head() function 上以清楚地显示所有列

[英]How do i make the dataset displayed on the head() function to show all the columns clearly

I used the head() function to display the 1st six rows of my dataset but it doesn't show all the column names clearly.我使用 head() function 来显示我的数据集的前六行,但它没有清楚地显示所有列名。 This is the way it appears:这是它的显示方式:

head(activity)
# A tibble: 6 × 15
          Id Activ…¹ Total…² Total…³ Track…⁴ Logge…⁵ VeryA…⁶ Moder…⁷ Light…⁸ Seden…⁹
       <dbl> <chr>     <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>
1 1503960366 4/12/2…   13162    8.5     8.5        0    1.88   0.550    6.06       0
2 1503960366 4/13/2…   10735    6.97    6.97       0    1.57   0.690    4.71       0
3 1503960366 4/14/2…   10460    6.74    6.74       0    2.44   0.400    3.91       0
4 1503960366 4/15/2…    9762    6.28    6.28       0    2.14   1.26     2.83       0
5 1503960366 4/16/2…   12669    8.16    8.16       0    2.71   0.410    5.04       0
6 1503960366 4/17/2…    9705    6.48    6.48       0    3.19   0.780    2.51       0

I saw someones work on kaggle and her own dataset using the head() function appeared this way我看到有人在 kaggle 上工作,她自己的数据集使用 head() function 以这种方式出现

A data.frame: 6 × 15
Id  ActivityDate    TotalSteps  TotalDistance   TrackerDistance LoggedActivitiesDistance    VeryActiveDistance  ModeratelyActiveDistance    LightActiveDistance SedentaryActiveDistance VeryActiveMinutes   FairlyActiveMinutes LightlyActiveMinutes    SedentaryMinutes    Calories
<dbl>   <fct>   <int>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <int>   <int>   <int>   <int>   <int>
1   1503960366  4/12/2016   13162   8.50    8.50    0   1.88    0.55    6.06    0   25  13  328 728 1985
2   1503960366  4/13/2016   10735   6.97    6.97    0   1.57    0.69    4.71    0   21  19  217 776 1797
3   1503960366  4/14/2016   10460   6.74    6.74    0   2.44    0.40    3.91    0   30  11  181 1218    1776
4   1503960366  4/15/2016   9762    6.28    6.28    0   2.14    1.26    2.83    0   29  34  209 726 1745
5   1503960366  4/16/2016   12669   8.16    8.16    0   2.71    0.41    5.04    0   36  10  221 773 1863
6   1503960366  4/17/2016   9705    6.48    6.48    0

Please how do i make mine to show all the columns clearly.请问我如何让我清楚地显示所有列。

you are displaying a tibble() , which only shows the first ten rows and all the columns that fit on one screen.您正在显示tibble() ,它仅显示前十行和适合一个屏幕的所有列。 You can control the default appearance with options.您可以使用选项控制默认外观。

Have you tried options(pillar.width = Inf) ?您是否尝试过options(pillar.width = Inf)

See ?pillar::pillar_options and ?tibble_options for the available options请参阅?pillar::pillar_options?tibble_options了解可用选项

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从数据集中制作多列的单个图形? - How do I make a single graph of multiple columns from a dataset? 如何将数据集的列乘以常数? - How do I multiply columns of a dataset by a constant? 如何创建一个函数,在我想要的列上比较 FIFA 数据集的两名球员? - How do I create a function that compares two players of a Fifa dataset on the columns I want? 如何在 Stata 中将变量制表以显示样本中的所有值,即使它们尚未出现在数据集中? - How do I tabulate a variable in Stata to show all values that are in my sample, even if they're not yet in the dataset? 如何将代码块(不仅是单个函数)应用于数据集中的所有列 - How to apply a chunk of code (not only a single function) to all columns in dataset 在R中,如何制作一个长数据集,其中包含一行适用的所有类别? - In R, how do I make a long dataset that contains all the categories that a row applies to? 如何用R增加Jupyter中显示的列数? - How do I increase the number of columns displayed in Jupyter with R? 如何汇总数据集某些行的列? - How do I sum columns of certain rows of my dataset? 在RStudio中-如何导入未指定列的csv数据集? - In RStudio -How do I import a csv dataset with no columns specified? 如何在 dataframe 的所有列中使用跨 function 而不是指定某些列? - How do I use the across function across all columns of a dataframe rather than specify certain columns?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM