Questions tagged [base-r]

base-r is the default R which can be used to perform basic functions mathematical and statistical tasks. It can also be used to make basic plots.

3 questions
1
vote
5 answers

Unnest matrix in base R

Consider a nested matrix of this form, of which each element is a vector, list, or dataframe: m <- matrix(replicate(3, list(1:3))) m # [,1] #[1,] integer,3 #[2,] integer,3 #[3,] integer,3 How does one "unnest" this matrix? i.e. get this…
Maël
  • 45,206
  • 3
  • 29
  • 67
0
votes
1 answer

How to fit daily data into monthly plot?

I have a very basic Base R plot, which draws two lines of rates from 2020 and 2021 in red and green, grouped monthly. This is the code for it: plot(total2020Plot$Rates, type = "l", col = 3, ylim = c(0, 35)) lines(averagePlot$Rates, …
paprika
  • 164
  • 1
  • 8
-1
votes
1 answer

Layering/stacking/multiple graphs on one plot using symbols

I'm trying to do this with base-r plot(x=NA, ylim = range(smokyants$elevation_m), xlim = range(smokyants[,5:42])) for(ii in seq(1,length(ants))) { points(unlist(elevation)~unlist(ants[ii])) #symbols(smokyants$elevation_m, unlist(ants[ii]),…
Dai Ten
  • 3
  • 1