R -6- Useful functions

This section provides you few a few useful or frequently used functions that may make your work quicker or at least easier. Making series, handling vectors and objects…


rep()
Here you will find useful functions to create series of numbers to populate your tables and objects. These functions are also quite useful when you want to make a simulation or try functions on a random data set or on a test sample. Note that some functions return integers (numbers […]

1. Creating series


class()
Here are a few functions which are useful to handle and manage objects. ls() lists all the vectors and variables currently stored in memory. Note that the function objects() does exactly the same.   rm() erases from the memory the vector or variable which is named between the brackets. In […]

2. Managing objects


dataset[]
head(test) returns by default the first sixth entries in the vector “test”; head(test, 3) returns only the first three entries in the vector “test”. Check the example below:   tail(test) returns the last sixth entries in the vector “test”; tail(test, 3) returns only the last three entries in the vector […]

3. Diverse functions