This should create your files for you:
x <- 1:1080 # test data
# create a vector of 30 consecutive values for spliting the data
breaks <- rep(1:ceiling(length(x) / 30), each=30)[1:length(x)]
# now partition the data into 30 values and write them
fileNo <- 1 # initialize the file number
invisible
Hi,
I am new to programming and R. I am reading the manual and R books by Dalgaard
and Veranzo to help answer my questions but I am unable to figure out the
following:
I have a data file that contains 1080 data points. Here's a snippet of the file:
[241] 0.3603704000 0.1640741000 0.291296
Natalie Zayats wrote:
> Hi all,
>
> Does anybody know whether one can nest IF statement in multiple FOR loops ?
> According to results of my code, only the first iteration of each loop is
> performed...
>
>
Well, yes, that should be possible. Proving your claim with actual
sample code would giv
Please supply some code that reproduces the problem!
cheers,
Simon.
Natalie Zayats wrote:
> Hi all,
>
> Does anybody know whether one can nest IF statement in multiple FOR loops ?
> According to results of my code, only the first iteration of each loop is
> performed...
>
> Thanks,
>
> Regards,
Hi all,
Does anybody know whether one can nest IF statement in multiple FOR loops ?
According to results of my code, only the first iteration of each loop is
performed...
Thanks,
Regards,
Natalie
[[alternative HTML version deleted]]
__
R-hel
ote:
Date sent: Tue, 20 Jun 2006 14:20:50 +0200
From: René Capell <[EMAIL PROTECTED]>
To: r-help@stat.math.ethz.ch
Organization: http://freemail.web.de/
Subject: [R] nested for loop restriction?
> Hello,
>
Hello,
is there a restriction for the number of loops in a nested for-loop in R?
I wrote a small function to replace water gage hights by discharge values,
where the outer loop walks through the levels of a gage time series and the
inner loop looks up the corresponding dicharge value in a vector