Can anyone explain this?
I have a matrix with double components. It's taking up a lot of memory, so I
want to multiply then turn it to integers. I'm pretty certain that there are
only 2 decimal places, but I wanted to check by using modulo. E.g.
mat = matrix(11:50/100, ncol=4,nrow=10) #Matrix wi
Thanks for the response. I read through the Inferno and there's a lot of
useful stuff in there. However I think you may have missed something.
Having some experience with other languages, I know that floating point
numbers aren't represented exactly, the issue is that R is off by much more
than w
Hi,
I want to subset a data frame if one of the variables matches any in a list.
I could of course do something like this:
subset(dataset, var == 1 | var == 2 | var ==3)
but that's tedious.
I tried
varlist = c(1,2,3,4)
subset(dataset, any(var == varlist))
but it doesn't work because 'any' doesn't
I'd like to get a long data set of minimum values from groups in another data
set.
The following almost does what I want. (Note, I'm using the word factor
differently from it's meaning in R; bad choice of words)
myframe = data.frame(factor1 = rep(1:2,each=8), factor2 =
rep(c("a","b"),each=4, time
4 matches
Mail list logo