Erin-Rooney/WyoP

hsd table issue

Closed this issue · 5 comments

@kaizadp

Do you know what I did wrong here? All of the phosphorus pools have the same values. I went line by line and I think it happens somewhere in the code for abund_table_with_hsd_ftrt. But I'm not sure what happens.

# combine with summarized table
#something is going wrong and I'm winding up with phos pools all being the same
abund_table_with_hsd_ftrt =
table_ftrt %>%
left_join(abund_hsd_ftrt) %>%
# combine the values with the label notation
mutate(value = paste(summary, label),
# this will also add " NA" for the blank cells
# use str_remove to remove the string
#value = str_remove(value, " NA")
) %>%
dplyr::select(-summary, -label) %>%
pivot_wider(names_from = "phos_pool", values_from = "value") %>%
force()

image

line 305 should be:
group_by(ctrt, time, phos_pool) %>%

group_by(ctrt, time) %>%

also, in your packages script, comment out the install.packages() line. Otherwise, you're installing the package each time you source() the script.

install.packages("IDPmisc")

Also, add .DS_Store to the gitignore

I actually had line 305 like that originally and changed it to try to solve the problem. It's still messed up when I change it back.

same problem on line 273
You were getting the same value for all because table_ftrt did not have a column for phos_pool.

group_by(ctrt, ftrt, time, phos_pool) %>%

group_by(ctrt, ftrt, time) %>%

This gives me:

image

Ohhh!!! Thank you!!