O'Reilly logo

R Statistical Application Development by Example Beginner's Guide by Prabhanjan Narayanachar Tattar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – understanding constants, vectors, and basic arithmetic

We will look at a few important and interesting examples. You will understand the structure of vectors in R and would also be able to perform the basic arithmetic related to this requirement

  1. Key in LETTERS at the R console and hit the Enter key.
  2. Key in letters at the R console and hit the Enter key.
  3. To obtain the first five and the last five alphabets, try the following code: LETTERS[c(1:5,22:26)] and letters[c(1:5,22:26)].
  4. Month names and their abbreviations are available in the base package and explore them using ?Constants at the console.
  5. Selected month names and their abbreviations can be obtained using month.abb[c(1:3,8:10)] and month.name[c(1:3,8:10)]. Also, the value of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required