作者tony1331 (BLUE)
看板R_Language
標題[問題]
時間Wed Sep 13 20:25:31 2017
[問題類型]:
我想用R 做某件事情,但是我不知道要怎麼用R 寫出來
[軟體熟悉度]:
寫過程式,R 是我的第一次
[問題敘述]:
http://i.imgur.com/yKt85T3.jpg
目前只會單列unique,想把每列都unique~
懇請教導,感謝~
不好意思手機發文好像怪怪的
-----
Sent from JPTT on my Asus ASUS_Z012DA.
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.83.119.123
※ 文章網址: https://webptt.com/m.aspx?n=bbs/R_Language/M.1505305534.A.764.html
※ 編輯: tony1331 (111.83.119.123), 09/13/2017 20:59:48
※ 編輯: tony1331 (111.83.119.123), 09/13/2017 21:00:10
※ 編輯: tony1331 (111.83.119.123), 09/13/2017 21:00:46
※ 編輯: tony1331 (111.83.119.123), 09/13/2017 21:01:57
1F:→ clansoda: 這是一個dataframe? 為啥有的空格大有的空格小阿09/13 21:14
2F:→ clansoda: 如果是dataframe 就把vector拉出來unique在assign回去09/13 21:14
3F:→ clansoda: 第二個問題看不懂 unique完不就大家都一次09/13 21:15
4F:→ tony1331: 第2個沒有unique過09/13 21:17
5F:→ tony1331: 拉出來unique 可是我有1萬多列09/13 21:18
6F:→ tony1331: 想說有沒有辦法直接每列unique09/13 21:19
※ 編輯: tony1331 (111.83.119.123), 09/13/2017 21:27:30
7F:→ celestialgod: 看不太懂,每列組數不一是什麼意思 09/13 21:33
8F:→ celestialgod: 你例子裡面每列都是6個英文字母阿 09/13 21:34
9F:→ celestialgod: 我覺得你可以直接給一個程式碼可以產生你的資料 09/13 21:34
10F:→ celestialgod: 而且到底是數字還是英文字母 09/13 21:35
11F:→ celestialgod: 處理方式完全可以不一樣.... 09/13 21:35
12F:→ celestialgod: 請具體呈現一下你的資料格式會比較好 09/13 21:36
13F:→ clansoda: 感覺不是困難的問題 只是要有一個示範資料比較好解 09/13 21:51
14F:→ clansoda: 格式要跟你真正的資料一樣 09/13 21:51
15F:→ tony1331: 好的 我截個圖 09/13 21:56
※ 編輯: tony1331 (111.83.119.123), 09/13/2017 21:59:44
※ 編輯: tony1331 (111.83.119.123), 09/13/2017 22:59:25