I want to create a table from a data frame that looks like:
name amount Mary 7065 Anna 2604 Emma 2003 Elizabeth 1939 Minnie 1746 Margaret 1578
However, when I use the code
name1=data.frame(example1$name,example1$amount)
table(name1)
I get the error:
> Error in tabulate(bin, pd) : cannot allocate vector of length 1206074100
Does this mean I first need to assign memory space, and if so how is this done for a data frame ?
The output for str(name1)
:
> data.frame': 1724892 obs. of 2 variables: $ example1.name : Factor
> w/ 89925 levels "Aaron","Ab","Abbie",..: 1259 119 587 545 1330 1232
> 862 60 217 1642 ... $ example1.amount: int 7065 2604 2003 1939 1746
> 1578 1472 1414 1320 1288 ...