ISU-Monarchs / HabitatRestoration

R data package containing data from a series of habitat restoration projects running from 2016-2019
0 stars 0 forks source link

Filling in Missing Data #76

Closed nulloa closed 5 years ago

nulloa commented 5 years ago

@sethapp when filling in missing values should we fill in with 0 or NA?

For example in daubenmire/2019/06/17/NickO/gro1_tgro1a_1.csv2 looks like this:

"Direction",0m,10m,20m,30m,40m,50m,60m,70m,80m,90m
“n”,16,11,11,12,10,8
“e”,7,10,7,7,6,6
“s”,7,11,8,8,8,5
“w”,5,7,7,6,8,7

The pdf shows this: image

Should it be changed to:

"Direction",0m,10m,20m,30m,40m,50m,60m,70m,80m,90m
“n”,16,11,11,12,10,8,0,0,0,0
“e”,7,10,7,7,6,6,0,0,0,0
“s”,7,11,8,8,8,5,0,0,0,0
“w”,5,7,7,6,8,7,0,0,0,0

or

"Direction",0m,10m,20m,30m,40m,50m,60m,70m,80m,90m
“n”,16,11,11,12,10,8,NA,NA,NA,NA
“e”,7,10,7,7,6,6,NA,NA,NA,NA
“s”,7,11,8,8,8,5,NA,NA,NA,NA
“w”,5,7,7,6,8,7,NA,NA,NA,NA

I was thinking 0 but wanted to be sure first

sethapp commented 5 years ago

This is actually what it should say. There are no zeros, NAs, or missing values. The transect is only 60m long so the header should have been shortened.

"Direction",0m,10m,20m,30m,40m,50m “n”,16,11,11,12,10,8 “e”,7,10,7,7,6,6 “s”,7,11,8,8,8,5 “w”,5,7,7,6,8,7

nulloa commented 5 years ago

Perfect. Thanks!

In general, is there a way to know if it's 0s or simply should be shortened?

sethapp commented 5 years ago

If you see a large consistent chunk of potentially missing data I would go check the survey.rda to see what the transect length was. Remember that the final line of the header will be 10m less than the length of the transect, i.e. a 60m transect takes data from 0-50m but not at 60m; it will have 6 values.

nulloa commented 5 years ago

Ahhh good point. I'll do that. Thanks! Hoping to get everything done later today and I'll get to your email.