User Tools

Site Tools


r_snippets

Differences

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

Link to this comparison view

Next revision
Previous revision
r_snippets [2019/02/08 17:53] – created hyjeongr_snippets [2021/03/17 13:09] (current) – external edit 127.0.0.1
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.1549615990.txt.gz · Last modified: (external edit)