i have these dataframes (pic)
what does 1:6, 1:2 mean ?
also how does the "points" function work in R ?
Br. Rasmus
i have these dataframes (pic)
what does 1:6, 1:2 mean ?
also how does the "points" function work in R ?
Br. Rasmus
Those objects are not data frames, they are matrices with 6 rows and 2 columns. The numbers in square brackets describe the dimensions of the rows and column. You can make a similar object with
MAT <- matrix(1:12,nrow = 6)
You can transform them into data frames with code like
t1_DF <- as.data.frame(t1)
An important difference between data frames and matrices is that a data frame can have columns of different types. The first column might be text and the second might be numbers. A matrix must contain only one data type.
The points function is used to add data points to a plot that already exists. If you have a question about that, please start another topic since having multiple questions in one topic leads to confusing answers.
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.