R Language Tutorial

Editing R Docs on Stack Overflow

See the documentation guidelines for general rules when creating documentation.

A few features of R that immigrants from other language may find unusual

  • Unlike other languages variables in R need not require type declaration.
  • The same variable can be assigned different data types at different instances of time, if required.
  • Indexing of atomic vectors and lists starts from 1, not 0.
  • R arrays (and the special case of matrices) have a dim attribute that sets them apart from R’s “atomic vectors” which have no attributes.
  • A list in R allows you to gather a variety of objects under one name (that is, the name of the list) in an ordered way. These objects can be matrices, vectors, data frames, even other lists, etc. It is not even required that these objects are related to each other in any way.
  • Recycling
  • Missing values