What is the default data type of a variable in R when a number is assigned to it?

What is the default data type of a variable in R when a number is assigned to it?

a) character
b) integer
c) numeric
d) logical

Answer:

c) numeric

Explanation:

When a number is assigned to a variable, R treats it as numeric by default unless explicitly defined as an integer.

Scroll to Top