Question: I use the code below to simulate a dataset with 1 variable and 1 0 million observations. It is approximately 1 . 5 gigabytes (

I use the code below to simulate a dataset with 1 variable and 10 million observations. It is approximately 1.5 gigabytes (GB) in size.
df <- data.frame(code = rep(c("44543","85475"), times=100000000))
I would like to create a new binary variable to flag patients with diabetes. My dataset is large, so I want to be mindful of the size of the dataset. Which of the following will result in the SMALLEST dataset in terms of bytes? If multiple options yield the same size circle ALL that would yield the smallest size. Hint: if you data frame is called df1, you could run the following code below to get the size of the data frame in megabytes: object.size(df1)/(1024*1024)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!