Difficulty: beginner
Estimated Time: 10 minutes

Learn how to start programming in R environment, explore it and manage.

Welcome to the R Environment Katacoda scenario!

You've completed R Environment scenario.

You've learnt how to:

  • run the code
  • create variables
  • explore the environment
  • cleaning the environment

Find out about basic types in the next scenario of the course.

R Environment

Step 1 of 5

Running the code

Like many other languages, R has a variety of basic types and more complex types that can be created from the 'atomic' ones. Basic types in R are:

  • numeric (real)
  • integer
  • character
  • logical
  • complex

Creating a variable of a specific type can be done by using assign <- operator:

num <- 10

For initialising text variable you can use both ' and ":

chr <- "some text"

Logical values can be created using TRUE/FALSE or just T/F:

log <- TRUE

Notice that R is dynamic when it comes to types, so you can assign character value to the variable that previously was set to different type:

myVar <- 10

myVar <- 'text value'

This tab will not be visible to users and provides only information to help authors when creating content.

Creating Katacoda Scenarios

Thanks for creating Katacoda scenarios. This tab is designed to help you as an author have quick access the information you need when creating scenarios.

Here are some useful links to get you started.

Running Katacoda Workshops

If you are planning to use Katacoda for workshops, please contact [email protected] to arrange capacity.

Debugging Scenarios

Below is the response from any background scripts run or files uploaded. This stream can aid debugging scenarios.

If you still need assistance, please contact [email protected]