R: Variable Naming Conventions

Some programming language has some official naming convention, Which is issued by the organisation behind the language and it is also accepted by the users.

There are many different naming conventions and below is a list of some most common All these are used in the R community.

alllowercase:

It is difficult to read especially for those who are non-native readers. In this, all letters are lower case and no separator is used in the name for making multiple words. It is commonly used in MATLAB.

Example:sourcefile

period.separated:

In this convention, names are confusing for users of other languages in which dots play an important role. Here all letters are in lower case and multiple words are separated by a period. It is the unique naming convention for R and it is used for many core functions.

Example: as.complex 

underscore_separated:

Here all letters are in lower case and multiple words are separated by an underscore. It is used for function and variables names in many other languages like Perl, Ruby and C++.

Example: package_version. 

camelCase:

Some names which are of a single word consist of lower case letters and in the case of the name which has more than one word all except the first word are capitalized. It is generally used for the method names in java and java-script.
Example: arjitSinghRawat

UpperCamelCase:

In this convention, words are capitalized for both cases when the name consists of single or multiple words It is used for class names language including Java, Python, and JavaScript.

Example:ArjitSinghRawat