当我尝试绘制它们时,我的数据框中找不到变量

时间:2017-02-12 02:06:39

标签: r

我成功(似乎)正在读取名为abalone的csv文件,该文件有9个变量。但我似乎无法对它们做任何事情,例如情节:

abalone <- read_csv("~/Abalone/abalone/abalone.csv")

    Parsed with column specification:
    cols(
    Sex = col_character(),
    Length = col_double(),
    Diameter = col_double(),
    Height = col_double(),
    `Whole weight` = col_double(),
    `Shucked weight` = col_double(),
    `Viscera weight` = col_double(),
    `Shell weight` = col_double(),
    Rings = col_integer()
  )

Diameter

    Error: object 'Diameter' not found

Rings

    Error: object 'Rings' not found

summary(abalone)

        Sex                Length         Diameter          Height        Whole         weight    Shucked weight  
 Length:4177        Min.   :0.075   Min.   :0.0550   Min.   :0.0000   Min.   :0.0020   Min.   :0.0010  
 Class :character   1st Qu.:0.450   1st Qu.:0.3500   1st Qu.:0.1150   1st Qu.:0.4415   1st Qu.:0.1860  
 Mode  :character   Median :0.545   Median :0.4250   Median :0.1400   Median :0.7995   Median :0.3360  
                    Mean   :0.524   Mean   :0.4079   Mean   :0.1395   Mean   :0.8287   Mean   :0.3594  
                    3rd Qu.:0.615   3rd Qu.:0.4800   3rd Qu.:0.1650   3rd Qu.:1.1530   3rd Qu.:0.5020  
                    Max.   :0.815   Max.   :0.6500   Max.   :1.1300   Max.   :2.8255   Max.   :1.4880  
 Viscera weight    Shell weight        Rings       
 Min.   :0.0005   Min.   :0.0015   Min.   : 1.000  
 1st Qu.:0.0935   1st Qu.:0.1300   1st Qu.: 8.000  
 Median :0.1710   Median :0.2340   Median : 9.000  
 Mean   :0.1806   Mean   :0.2388   Mean   : 9.934  
 3rd Qu.:0.2530   3rd Qu.:0.3290   3rd Qu.:11.000  
 Max.   :0.7600   Max.   :1.0050   Max.   :29.000  

这就是我正在尝试的:

plot(Length ~ Sex, data=abalone)

错误:

Error in plot.window(...) : need finite 'xlim' values

另外:警告信息:

1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf

0 个答案:

没有答案