Displaying 6 results from an estimated 6 matches for "wyear".
Did you mean:
year
2017 Jul 04
5
about adding a column for water year
Hi R users,
I have a question about adding a column for water year. The dataframe has
the structure below. But the wyear column just shows one year. Could anyone
help me with this problem? Thanks.
DF
year month day time flow
1972 1 1 1972-01-01 5
1972 1 2 1972-01-02 5.5
1972 1 3 1972-01-03 6
...
1985 12 31 1985-12-31...
2017 Jul 04
0
about adding a column for water year
...t is not NA."
Your cond is a vector of length nrow(DF), so you don't want if, you
want ifelse().
Did you fail to show us your warning messages??
2. Revising your code and eliminating the extraneous brackets, one gets:
for(i in 1972:1985){
ifelse(DF$year==i & DF$month %in% 1:9, DF$wyear <- i,
DF$wyear < i-1)
}
But that doesn't work either, giving only 1985. Why? -- because the
assignment statement DF$wyear <- i assigns the single value i to the
whole column. So the whole column gets the last value of 1985, which
is presumably what you saw but neglected to tell us...
2017 Jul 04
0
about adding a column for water year
Hello,
You have a '{' too many.
for(i in 1972:1985){
if(DF$year==i & DF$month %in% 1:9){
DF$wyear <- i
}else{
DF$wyear < i-1
}
}
}
I believe this is it.
Hope this helps,
Rui Barradas
Em 04-07-2017 19:31, lily li escreveu:
> Hi R users,
> I have a question about adding a column for water year. The dataframe has
> the structure below. But the wyear...
2009 May 21
2
Naming a random effect in lmer
.... This set
of effects is of variable size, so I am using an as.formula statement to
create the formula for lmer. For example, if the set of random effects has
dimension 8, then the lmer call is:
Zs<- paste("Z",1:mb,sep="")
Trendformula <-as.formula(paste("LogY ~ WYear + (1+WYear|Site) + (1|",
paste(paste(Zs,collapse="+"), ")")))
fit2.4a<-lmer(Trendformula, data = testsamp)
which, for mb=8, expands to:
fit1<-lmer(LogY ~ WYear + (1 | Site) + (1 | Year) + (1 | Z1+ Z2 + Z3 + Z4 +
Z5 + Z6 + Z7 + Z8), data = testsamp)
I have no pr...
2006 Mar 02
1
Error while compiling code using wineg++ / winegcc
...ing winegcc tool.
Can anybody help?
Here's the program source code:
// file test.cpp
#include <stdio.h>
#include <windows.h>
int main ()
{
SYSTEMTIME lpSystemTime;
GetSystemTime(&lpSystemTime);
printf("Today is: %d/%d/%d\n", lpSystemTime.wYear,
lpSystemTime.wMonth, lpSystemTime.wDay);
return 0;
}
When I try to compile it using winegcc, it gives following error
message:
testuser@testbox:~/test >wineg++ test.cpp
winegcc: -fshort-wchar failed.
On adding a flag '-v' with wineg++, a detailed erro...
2004 Jul 31
3
Bug in new_work_item
Hi all,
Windows 2000
Ruby 1.8.2 R7
VC++ 6.0
I noticed that if I try to call new_work_item and give
the task a name that already exists, I get a segfault:
C:\eclipse\workspace\win32-taskscheduler>ruby test.rb
"0.1.0"
test.rb:22:in `new_work_item'': NewWorkItem() function
failed (Win32::TaskSchedul
erError)
from test.rb:22
test.rb:22: [BUG] Segmentation fault
ruby