usefull websites, probably
because i cannot pinpoint the best search words.
--
View this message in context:
http://r.789695.n4.nabble.com/R-loop-problem-tp3718103p3718103.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r
the best search words.
--
View this message in context:
http://r.789695.n4.nabble.com/R-loop-problem-tp3718103p3718103.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
://www.glsc.usgs.gov (GLSC web site)
http://profile.usgs.gov/jvadams (My homepage)
jvad...@usgs.gov (E-mail)
From:
testrider testri...@gmail.com
To:
r-help@r-project.org
Date:
08/04/2011 07:21 AM
Subject:
[R] R loop problem
Sent by:
r-help-boun...@r-project.org
I have run into a speed issue, and given
Worked like a charm!
Thanks a lot Jean V Adams
--
View this message in context:
http://r.789695.n4.nabble.com/R-loop-problem-tp3718449p3718670.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https
Hi there,
I'm new working with R and I am trying to find the unchosen set of islands
that are closer to all the possible combination (of 2 out of 13) of a set of
chosen islands.
In other words, if I have a set of 13 islands (1, 2, ...13) and choose all
the possible combination of 2 islands (1-2,
Thanks a lot David for your answer. I am sorry for being so minimal.
I wanted to produce a list/vector/table consisting each vector produced from
this code
len-20
for (n1 in seq(0,(len-1),by=1)){
f - R_event[R_event (rx[1]+ n1*300) R_event = (rx[1] + 300*(n1+1))]
//create list for each values
On Oct 2, 2009, at 7:34 AM, crenial30 wrote:
Thanks a lot David for your answer. I am sorry for being so minimal.
I wanted to produce a list/vector/table consisting each vector
produced from
this code
len-20
for (n1 in seq(0,(len-1),by=1)){
f - R_event[R_event (rx[1]+ n1*300) R_event =
I have the following code which I wanted to convert using for loop
previous code:
R_ev1 - R_event[R_event (rx[1] + 300*0) R_event = (rx[1] + 300*1)]
R_ev2 - R_event[R_event (rx[1] + 300*1) R_event = (rx[1] + 300*2)]
R_ev3 - R_event[R_event (rx[1] + 300*2) R_event = (rx[1] + 300*3)]
R_ev4 -
That code is way more than a _minimal_ example, and its not
_reproducible_ either, so just a comment:
Have you considered creating a vector rather than separate event
variables?
R_ev[1:16] - R_event (rx[1] + 300*(0:15) R_event = (rx[1] +
300*(1:16)
?cut # would also appear to be a
Hi Alex,
On Sun, April 5, 2009 16:49, Alex Roy wrote:
Dear R users,
I have problem with extracting coefficients from a
object. Here, X (predictor)and Y (response) are two matrix , I am
regressing
X ( dimensions 10 x 20) on each of columns of Y[,1] (10 x 1) and want to
Dear R users,
I have problem with extracting coefficients from a
object. Here, X (predictor)and Y (response) are two matrix , I am regressing
X ( dimensions 10 x 20) on each of columns of Y[,1] (10 x 1) and want to
store the coefficient values. I have performed a Elastic Net
: Monday, 6 April 2009 12:49 AM
To: r-help@r-project.org
Subject: [R] loop problem for extract coefficients
Dear R users,
I have problem with extracting coefficients from a
object. Here, X (predictor)and Y (response) are two matrix , I am regressing
X ( dimensions 10 x 20) on each
Dear R members
I have a problem regarding storing the lists.
Let
L=number of distinct values of any predictor (say L=5)
P=number of predictors (say P=20)
g1 - c()
for(i in 1:P){
if(L 1){
for(j in 1:(L-1)){
g -
g1[j] - g
}
}
g2[]=sort.list(g1)
Muhammad Azam wrote:
Dear R members
I have a problem regarding storing the lists.
Let
L=number of distinct values of any predictor (say L=5)
P=number of predictors (say P=20)
g1 - c()
for(i in 1:P){
if(L 1){
for(j in 1:(L-1)){
g -
g1[j] - g
}
}
Dear all,
I want to
write ck-cbind(rep(pk[1,1],4),rep(pk[1,2],4),rep(pk[1,3],4)) state ment
in a loop . How can I write it ?
pk
[,1] [,2] [,3]
[1,] -1.1354816 0.9808877 -0.9446314
[2,] 0.7787378 0.4536944 0.3204882
[3,] -1.7274907 1.5112011 1.4481839
/337015
Web: http://med.kuleuven.be/biostat/
http://www.student.kuleuven.be/~m0390867/dimitris.htm
- Original Message -
From: fernanda lopez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 14, 2008 10:33 AM
Subject: [R] Loop problem
Dear all,
I want to
write ck
Hi, do you mean this?
pk-matrix(rnorm(12),nrow=4,ncol=3)
ck1-cbind(rep(pk[,1],4),rep(pk[,2],4),rep(pk[,3],4)) ## or
ck2-cbind(rep(pk[,1],each=4),rep(pk[,2],each=4),rep(pk[,3],each=4))
pk
ck1
ck2
best,
Daniel
fernanda lopez wrote:
Dear all,
I want to
write
Try this:
pk[rep(1, 4), ]
On Mon, Jul 14, 2008 at 4:33 AM, fernanda lopez [EMAIL PROTECTED] wrote:
Dear all,
I want to
write ck-cbind(rep(pk[1,1],4),rep(pk[1,2],4),rep(pk[1,3],4)) state ment
in a loop . How can I write it ?
pk
[,1] [,2] [,3]
[1,]
Jamie Ledingham wrote:
Dear all, I have a problem with a loop, if anyone has any knowledge on
these things I would appreciate some comments. The code below is
designed to allow me to extract the top record of the data frame, and
them remove rows from the data frame which have an index close
Oops, missed the first line of the example:
storm.data-data.frame(meas.index=10001:2,cumrain=runif(1,-10,10)+10)
You can generalize the function to whatever column names you have like this:
find.max.rain-function(raindata,howmany,raincol) {
# a lazy way of getting the same structure
Dear all, I have a problem with a loop, if anyone has any knowledge on
these things I would appreciate some comments. The code below is
designed to allow me to extract the top record of the data frame, and
them remove rows from the data frame which have an index close to the
extracted top record.
Basically you are moving the data up and then incrementing to the next
row. Here is an example; assume that you are at the 2nd entry:
1
2 == here
3
4
Now your loop index is 2 and you remove the current data ('2') and are
left with:
1
3 == index of 2 points here
4
Now you increment the index
22 matches
Mail list logo