rlads2021 / hw4

HW 4: List, Loop, and Data frame
https://rlads2021.github.io/hw4
0 stars 9 forks source link

進階題 2 跟 3 的套件使用 #6

Open ShinYueJi opened 3 years ago

ShinYueJi commented 3 years ago

請問不能使用套件是連 tibble 底下的 as_tibble 都不能使用嗎? 如果不用它最後印出的答案不會出現 "with xx more rows"

andreashih commented 3 years ago

沒有印出 with xx more rows 也沒關係~只要程式是對的就好!

ShinYueJi commented 3 years ago

那想請問下面這行有需要一樣嗎?在其他行都相同的情況下

`

>

`

andreashih commented 3 years ago

理論上應該會一樣,可以問是哪裡不一樣嗎?

ShinYueJi commented 3 years ago

(進階題第一小題)我如果沒特別轉換格式,直接讀檔轉 tibble 會產生

#> <fct> <int> <int> <int> <dbl> <dbl>

liao961120 commented 3 years ago

讀取 csv 檔的函數有辦法設定參數去調整讀進來要變 factor 還是 character 喔,可以看看說明文件怎麼說

ShinYueJi commented 3 years ago

但是 int 還是沒辦法主動轉成 dbl

這是我最後印出的樣子 #> <chr> <int> <int> <int> <dbl> <dbl>

另外想請問有不使用 tibble 套件也能印出

#> # A tibble: 85 x 7 #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>

#> # … with 75 more rows

這三行的方法嗎? 看解答都有出現它們

liao961120 commented 3 years ago

int 沒關係喔~