Erin-Rooney / WyoP

"Mineral and organic matter associated phosphorus in soils of winter wheat (Triticum aestivum, L.) and cover crop systems"
0 stars 0 forks source link

hsd table issue #4

Closed Erin-Rooney closed 3 years ago

Erin-Rooney commented 3 years ago

@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.

https://github.com/Erin-Rooney/WyoP/blob/1929dd0be05f015101dce463b1d870e503ca504c/code/3-threewayanovas-som.R#L308-L322

image

kaizadp commented 3 years ago

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

https://github.com/Erin-Rooney/WyoP/blob/1929dd0be05f015101dce463b1d870e503ca504c/code/3-threewayanovas-som.R#L305

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

https://github.com/Erin-Rooney/WyoP/blob/1929dd0be05f015101dce463b1d870e503ca504c/code/0-packages.R#L16

kaizadp commented 3 years ago

Also, add .DS_Store to the gitignore

Erin-Rooney commented 3 years ago

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.

kaizadp commented 3 years ago

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) %>% https://github.com/Erin-Rooney/WyoP/blob/bfc403a563430b4ccfb5d508e6c10e74764e5b60/code/3-threewayanovas-som.R#L273

This gives me:

image
Erin-Rooney commented 3 years ago

Ohhh!!! Thank you!!