wush978 / DataScienceAndR

R語言翻轉教室
www.datascienceandr.org
148 stars 79 forks source link

ggplot2 37% 做不出來 #197

Closed ningchencontact closed 8 years ago

ningchencontact commented 8 years ago

| 請同學利用group_bysummarise計算各種sex類別的個數。

hsb %>%

  • group_by(sex) %>%
  • summarise(a=n()) Source: local data frame [2 x 2]
 sex     a

(fctr) (int) 1 female 109 2 male 91

我認為我答案是對的,但是,不給過~~

wush978 commented 8 years ago

你確認看看colnames呢?

ningchencontact commented 8 years ago

hsb %>%

  • group_by(sex) %>%
  • summarise(count=n()) Source: local data frame [2 x 2]
 sex count

(fctr) (int) 1 female 109 2 male 91

我有改了一下 欄位應該是對的 但還是過不去

wush978 commented 8 years ago

我也不知道為什麼你過不去(但是其他人可以)

麻煩貼上你的錯誤訊息喔!

ps. 沒過的話,應該會印出錯誤訊息

ningchencontact commented 8 years ago

我按skip 跟 "Press Enter when you are ready to continue..."

hsb %>%

| I just sourced the following script, which demonstrates one | possible solution.

Press Enter when you are ready to continue...

| Not exactly. Give it another go.

skip()

| I just sourced the following script, which demonstrates one | possible solution.

Press Enter when you are ready to continue...

| You're close...I can feel it! Try it again.

wush978 commented 8 years ago
  1. 檢查一下有沒有存檔喔
  2. 檢查一下檔案裡面的程式碼有沒有syntax error

方式:ctrl + A 後把內容通通送到console, 看R有沒有噴錯

wush978 commented 8 years ago

@agogomei01 我沒收到其他同學反應有問題,所以就先關閉了