Categories:

Content:

Initializing translator, please wait a moment...
Text-To-Speech Expand to full view

# R Programming - General

##### R Code

We will start of simple, instead of using the standard "Hello World" let's at least do something a little bit more complicated.

Assign Variables

Variable Types

# We set two regular R variables here
msg <- "hello"
msg2 <- "world"

# Then we use the Merge function to add the two variables together to new variable called long
long <- merge(msg,msg2)

# By using the Print function or just calling the new variable name to get the output of the long variable
print(long)

# If we want to use integers instead we can do the same with addition.
x <- 1 + 4

# one way of getting the value
print(x)

# another way of doing the same thing
x