OPERATING SYSTEMSOS Linux

R,HowtoUse cbind and str c,Error unexpected symbol in my tutorial3 my tutorial1,Error in strcmy tuto

demo@ubuntu:~/SelfStudy/R$ R

R version 3.4.4 (2018-03-15) — “Someone to Lean On”
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type ‘license()’ or ‘licence()’ for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type ‘contributors()’ for more information and
‘citation()’ on how to cite R or R packages in publications.

Type ‘demo()’ for some demos, ‘help()’ for on-line help, or
‘help.start()’ for an HTML browser interface to help.
Type ‘q()’ to quit R.

[Previously saved workspace restored]

my_tutorial1 – c(“a”,”b”,”c”)
my_tutorial2 – c(“d”,”e”,”f”)
my_tutorial3 my_tutorial1 + my_tutorial2
Error: unexpected symbol in “my_tutorial3 my_tutorial1”
my_tutorial3 – cbind(my_tutorial1 , my_tutorial2)
print(my_tutorial3)
my_tutorial1 my_tutorial2
[1,] “a” “d”
[2,] “b” “e”
[3,] “c” “f”
paste(my_tutorial1 , my_tutorial2)
[1] “a d” “b e” “c f”
strc(my_tutorial3 , collapse=” “)
Error in strc(my_tutorial3, collapse = ” “) :
could not find function “strc”
str_c(my_tutorial3 , collapse=” “)
Error in str_c(my_tutorial3, collapse = ” “) :
could not find function “str_c”
library(stringr)
strc(my_tutorial3 , collapse=” “)
Error in strc(my_tutorial3, collapse = ” “) :
could not find function “strc”
str_c(my_tutorial3 , collapse=” “)
[1] “a b c d e f”

source

by gocha’s learning space

linux foundation

Leave a Reply

Your email address will not be published. Required fields are marked *