What are the rules for naming variables in R?

  • Can start with a number, Can contain special characters, Case-insensitive
  • Can start with a number, Cannot contain special characters, Case-insensitive
  • Cannot start with a number, Can contain special characters, Case-sensitive
  • Cannot start with a number, Cannot contain special characters, Case-sensitive
Variables in R should start with a letter, and can contain letters, numbers, period (.) and underscore (_). Variable names in R are also case sensitive, so "mydata" and "MyData" would refer to different variables.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *