Skip to content
Prev 286747 / 398502 Next

Error occurred during mean calculation of a column of a data frame, which is apparently contents numeric data

On 29/02/2012 13:41, Duncan Murdoch wrote:
No, not really.  Character vectors (STRSXPs) store a pointer for each 
string entry, and factors store an integer.  On most current systems 
pointers are twice the size of integers, so on a 64-bit system

 > a <- rep(letters[1:10], each = 1000)
 > object.size(a)
80520 bytes
 > object.size(as.factor(a))
41008 bytes