Variables in R


Variables are used to store data, whose value can be changed according to our. To define the inputs or entity we have to give name our variables. To do so we have to follow certain rules for defining variables as in below:-




Naming Convension
  • alllowercase: e.g. dataframes
  • period.separated: e.g. firstname.lastname
  • underscore_separated: e.g. data_frames
  • lowerCamelCase: e.g. dFrame
  • UpperCamelCase: e.g. CalculateAge
Constants in R
  • Numeric Constants: It can be checked with the typeof() function. e.g. typeof(5)
  • Character Constants  : single quotes (') or double quotes (")   e.g. typeof("abc")
  • Built-in Constants: LETTERS,letters,pi,month.name etc e.g. letters[1:5]
[1] "a" "b" "c" "d" "e" UpperCamelCase: e.g. CalculateAge
Variables in R Reviewed by Rupesh on 01:20 Rating: 5

No comments:

All Rights Reserved by Technology from Developers Eye © 2014 - 2015
Powered By Blogger, Designed by Aadics
Disclaimers:: The information provided within this blogsite is for general informational purposes only. While we try to keep the information up-to-date and correct, there are no representations or warranties, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the information, products, services, or related graphics contained in this blogsite for any purpose.The author does not assume and hereby disclaims any liability to any party for any loss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from accident, negligence, or any other cause.

Contact Form

Name

Email *

Message *

Powered by Blogger.