To be fair, these replies no longer include the original question, which was
IMO really quite clear (if misguided), and was actually targeted at
understanding pre-allocation for better performance. Richard's suggestion to
store the along-the-way constructed vectors in a list and examine the leng
"It would be really really helpful to have a clearer idea of what you
are trying to do."
Amen!
But in R, "constructing" objects by extending them piece by piece is
generally very inefficient (e.g.
https://r-craft.org/growing-objects-and-loop-memory-pre-allocation/),
although sometimes?/often? una
Thank you Ivan and Richard...
Short version: a simple "sudo apt install texlive" fixed it.
Longer version (attempt at a post-mortem): previously (back on
2023-11-05) on this same system I built R version 4.3.2; and
/home/btyner/R432/lib/R/doc/NEWS.pdf does exist (and is a valid pdf with
48 pa
On my system, pdftexcmds.sty can be found in
/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
A quick poking around with 'apt' and 'dpkg-query -L' told me that this
comes from the
texlive-latex-recommended
Ubuntu package. So on my system, if I didn't already have this,
sudo apt
The matrix equivalent of
x <- ...
v <- ...
x[length(x)+1] <- v
is
m <- ...
r <- ...
m <- rbind(m, r)
or
m <- ...
k <- ...
m <- cbind(m, c)
A vector or matrix so constructed never has "holes" in it.
It's better to think of CONSTRUCTING vectors and matrices rather than
INITIALISING
5 matches
Mail list logo