OneBite.Dev - Coding blog in a bite size

declare a float number in R

Code snippet on how to declare a float number in R

x <- 3.14

This code creates a new number object, “x”, and assigns it a value of 3.14. The ”<-” symbol is often used in programming to assign a value to a new object. In this case, it assigns the number 3.14 to the object “x”. We can call this value a float number because the decimal places indicate that it is a number that can contain decimal values. This can be stored and used later in the program by calling the object “x”, or by referencing the numerical value.

r