R python will feel to learn to be a lot easier
vector
Vector is the basic unit of language in the R data storage and management, and other data structures are born on the basis of the vector, the vector is therefore also an atomic
vector type must be of the same elemental composition
substantially vector types : logical, integer , real number, complex, character and the byte
assignment symbol <-
combining functionc()
Matrix :
Creating Matrix:
selecting a matrix of an element ( not starting with 0 ):
Select line:
selecting a plurality of rows:
remove one or more rows (negative indexes):
using a vector are combined into a new matrix:
row composition
by a combination of column:
rownames()
for renaming
colnames()
Rename a column
Array
dim()
Returns the maximum value of each dimension
, if the above code vector is less than 30 (
), the principle of the R cycle in accordance with the language data padded:
Data block (DataFrame)
Create:
index and matrix similar to the
$
symbols used:
factor
The main factor for managing discrete categorical variables, functions factor()
created:
obviously see it as the default alphabetical ABCD
change the default sort order:
data levels specified in the parameter level and vectors appear to match, otherwise there will be missing values
Ordered:
List
Allowing the element contains a list of different types of
create a list:
a list of query:
sequentially
The time series is a special class of vector or matrix, the time series object can ts()
be created