-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
metab() can't be called by ddply()? confused #70
Comments
What does hfData look like? |
dput(head(hfData))
structure(list(lake = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = c("paul",
"peter"), class = "factor"), datetime = structure(c(1210694400,
1210694700, 1210695000, 1210695300, 1210695600, 1210695900), class = c("POSIXct",
"POSIXt"), tzone = "GMT"), year = c(2008, 2008, 2008, 2008, 2008,
2008), doy = c(134.666666666667, 134.670138888889, 134.673611111111,
134.677083333333, 134.680555555556, 134.684027777778), do.obs = c(10.4347483191214,
10.4528878395361, 10.4500595198614, 10.4380570411655, 10.4087379516118,
10.4055922795976), do.sat = c(10.0747468313655, 10.0999625107891,
10.0999846075527, 10.0807120402841, 10.0495479240296, 10.0239167387756
), wtr = c(12.379333051731, 12.2693323477265, 12.2692362745664,
12.3532440129325, 12.4899999039994, 12.6033339093371), doSat = c(97.6598307734584,
97.5865454017649, 97.5599284817454, 97.6332213454424, 97.6600261833021,
97.880076761626), z.mix = c(1.5, 1.5, 1.5, 1.5, 1.5, 1.5), k.gas = c(0.492825255571682,
0.511874243056661, 0.491352605979017, 0.492338819545, 0.475021164297611,
0.495831029616867), irr = c(147.5, 124.701986754946, 109.867549668811,
100.016501650173, 102.491749174914, 142.665562913905), wnd = c(1.18393660745817,
1.40853299870392, 1.18393660745817, 1.18234004295608, 0.942855367755401,
1.18393660745817), chl = c(2.30265083940554, 1.72931341004522,
1.56931878608269, 2.00878286367763, 2.53598513274742, 2.22931533006012
), pH = c(6.601958991, 6.621968761, 6.621978531, 6.631988334,
6.631998072, 6.632007842)), .Names = c("lake", "datetime", "year",
"doy", "do.obs", "do.sat", "wtr", "doSat", "z.mix", "k.gas",
"irr", "wnd", "chl", "pH"), row.names = c(NA, 6L), class = "data.frame")
|
Except I think I added a column "irr2" which was just the 0L 1L integer form of irr |
Can you filter the data.frame yourself and just supply it to metab? I doubt that ddply has anything to do with it. |
Yeah, if I subset it on my own (i.e., supply 1 lake-year) and supply it to I think it's crashing at the conquer list step in metab. Might have something to do with how ddply() stores the intermediates. Not On Sun, Nov 16, 2014 at 3:30 PM, Luke Winslow [email protected]
|
Wrap the metab function in a function and stick a breakpoint inside of |
I can run the following code fine when I pass each year-lake combo to
metab()
individually, but not when I try to do it all throughddply()
. I think the error might be in conquerList:Output:
The text was updated successfully, but these errors were encountered: