Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Numbers | Vectors
TEST R COURSE
course content

Зміст курсу

TEST R COURSE

TEST R COURSE

1. Basic Syntax and Operations
2. Vectors

Numbers

You got "double" as an output in the last chapter, despite the number 10 being an integer. Let's investigate it.

What types can numeric values in R be? Let's remind. These are:

  • numeric/double - real numbers.
  • integer - integer numbers.
  • complex - complex numbers.

But in the last chapter, you got "double" for an integer number. How to make R recognize integer numbers? One of the ways is to simply put L at the end of the number. For example,

12
typeof(10) # Example of double type typeof(10L) # Example of integer type
copy

This script will return the next output:

Why do we even need to differentiate 10 and 10L values? The answer is memory consumption - storing integers is 'easier' for computer memory.

Завдання

  1. Assign the current year's value to the variable year. Make this variable integer type by using L.
  2. Output type of newly created variable year.

Завдання

  1. Assign the current year's value to the variable year. Make this variable integer type by using L.
  2. Output type of newly created variable year.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 2. Розділ 2
toggle bottom row

Numbers

You got "double" as an output in the last chapter, despite the number 10 being an integer. Let's investigate it.

What types can numeric values in R be? Let's remind. These are:

  • numeric/double - real numbers.
  • integer - integer numbers.
  • complex - complex numbers.

But in the last chapter, you got "double" for an integer number. How to make R recognize integer numbers? One of the ways is to simply put L at the end of the number. For example,

12
typeof(10) # Example of double type typeof(10L) # Example of integer type
copy

This script will return the next output:

Why do we even need to differentiate 10 and 10L values? The answer is memory consumption - storing integers is 'easier' for computer memory.

Завдання

  1. Assign the current year's value to the variable year. Make this variable integer type by using L.
  2. Output type of newly created variable year.

Завдання

  1. Assign the current year's value to the variable year. Make this variable integer type by using L.
  2. Output type of newly created variable year.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 2. Розділ 2
toggle bottom row

Numbers

You got "double" as an output in the last chapter, despite the number 10 being an integer. Let's investigate it.

What types can numeric values in R be? Let's remind. These are:

  • numeric/double - real numbers.
  • integer - integer numbers.
  • complex - complex numbers.

But in the last chapter, you got "double" for an integer number. How to make R recognize integer numbers? One of the ways is to simply put L at the end of the number. For example,

12
typeof(10) # Example of double type typeof(10L) # Example of integer type
copy

This script will return the next output:

Why do we even need to differentiate 10 and 10L values? The answer is memory consumption - storing integers is 'easier' for computer memory.

Завдання

  1. Assign the current year's value to the variable year. Make this variable integer type by using L.
  2. Output type of newly created variable year.

Завдання

  1. Assign the current year's value to the variable year. Make this variable integer type by using L.
  2. Output type of newly created variable year.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

You got "double" as an output in the last chapter, despite the number 10 being an integer. Let's investigate it.

What types can numeric values in R be? Let's remind. These are:

  • numeric/double - real numbers.
  • integer - integer numbers.
  • complex - complex numbers.

But in the last chapter, you got "double" for an integer number. How to make R recognize integer numbers? One of the ways is to simply put L at the end of the number. For example,

12
typeof(10) # Example of double type typeof(10L) # Example of integer type
copy

This script will return the next output:

Why do we even need to differentiate 10 and 10L values? The answer is memory consumption - storing integers is 'easier' for computer memory.

Завдання

  1. Assign the current year's value to the variable year. Make this variable integer type by using L.
  2. Output type of newly created variable year.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 2. Розділ 2
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt