User Tools

Site Tools


r_snippets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

r_snippets [2019/02/08 17:53]
hyjeong created
r_snippets [2019/02/08 18:05] (current)
hyjeong
Line 6: Line 6:
   > myList.row = setNames(as.list(nato.abcde),​abcde)   > myList.row = setNames(as.list(nato.abcde),​abcde)
   > myList.col = list(alphabet = abcde, nato.phonetic.code = nato.abcde)   > myList.col = list(alphabet = abcde, nato.phonetic.code = nato.abcde)
 +  > myList.row$a
 +  [1] "​Alpha"​
 +  > myList.col$alphabet[3]
 +  [1] "​c"​
 +  > myList.row$a
 +  [1] "​Alpha"​
 +  > myList.col$nato.phonetic.code[3]
 +  [1] "​Charlie"​
 +  > myList.row["​b"​]
 +  $b
 +  [1] "​Bravo"​
 +  > myList.col$nato.phonetic.code[which(myList.col$alphabet == "​c"​)]
 +  [1] "​Charlie"​
 +  > > as.data.frame(myList.col)[which(myList.col$alphabet == "​e"​),​]
 +    alphabet nato.phonetic.code
 +  5        e               Echo
r_snippets.txt ยท Last modified: 2019/02/08 18:05 by hyjeong