OneBite.Dev - Coding blog in a bite size

declare an object in R

Code snippet on how to declare an object in R

myObj <- list(name = "John", age = 24, languagues = c("English", "French"))
``

This code creates a list object called "myObj" which contains three elements; "name", "age", and "languagues". The "name" element is assigned the value "John", the "age" element is assigned the value 24 and the "languages" element is assigned a vector of two values; "English" and "French". The "myObj" object is now available for use in R code and can be accessed to obtain the values associated with the elements.
r