Displaying 4 results from an estimated 4 matches for "foreloops".
Did you mean:
foreloop
2005 Jan 31
2
coercing a list to a data frame, lists in foreloops
I have a set of time-series climate data with missing entries. I need to add
rows for these missing entries to this data set. The only way I know to do
this is unsing a foreloop, but this won't work on a list. I've tried to
convert the list to a data frame, but that won't happen, either.
I want to fill rows in this table:
> newtest[10:15,]
yrmos yearmo snow.sum snow.mean
2010 Nov 01
3
foreloop? aggregating time series data into groups
I have a data set similar to the set below where 1 and 2 indicate test
results and 0 indicates time points in between where there are no test
results. I would like to allocate the time points leading up to a test
result with the value of the test result.
What I have: What I want:
1 1
0 1
0 1
0 1
1
2005 Mar 14
1
calling objects in a foreloop
I want to organize outputs from several regressions into a handy table. When I
try the following, each of my "fit_s" is replaces instead of read. Is there a
way to read from the regression summaries that does not require writing
separate lines of code for each?
-Ben Osborne
> fit1<-lm(dBA.spp16$sp2.dBA.ha~dBA.spp16$sp1.dBA.ha)
>
2004 Nov 22
2
variable object naming
Is it possible to give a temporary object a name that varies with each run of a
foreloop? For example, I want to fill a matrix every time I run a loop, and I
want a new matrix with each run, with an appropriate new name.
i.e.:
for(i in 1:5){... matrix.i<-some values ...}
so that in the end I would have:
matrix.1
matrix.2
matrix.3
matrix.4
matrix.5
Thanks,
Ben Osborne
--
Botany Department