"카타 8급 Expand a string"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
1번째 줄: 1번째 줄:
==R==
==R==
{{카타|8급|R|2}}
{{카타|8급|R|2}}
<source lang='r'>
<syntaxhighlight lang='r'>
expand <- function(s){
expand <- function(s){
   strsplit(s,"")[[1]]
   strsplit(s,"")[[1]]
}
}
</source>
</syntaxhighlight>
<source lang='r'>
<syntaxhighlight lang='r'>
expand <- function(s){
expand <- function(s){
   unlist(strsplit(s,""))
   unlist(strsplit(s,""))
}
}
</source>
</syntaxhighlight>
<source lang='r'>
<syntaxhighlight lang='r'>
expand <- function(s){
expand <- function(s){
   unlist(strsplit(s,NULL))
   unlist(strsplit(s,NULL))
}
}
</source>
</syntaxhighlight>

2021년 7월 31일 (토) 11:09 기준 최신판

R[ | ]

R
Copy
expand <- function(s){
  strsplit(s,"")[[1]]
}
R
Copy
expand <- function(s){
  unlist(strsplit(s,""))
}
R
Copy
expand <- function(s){
  unlist(strsplit(s,NULL))
}