similar to: Creating a loop that works....

Displaying 20 results from an estimated 2000 matches similar to: "Creating a loop that works...."

2003 Jul 14
2
problem with coding for 'optim' in R
Hi, there I am a graduate student new to coding in S who is hitting a bit of a wall at present using an "optim" function. I am running into some troubles, and was hoping someone might be able to recognize where I am going wrong. As background: I have constructed a loop that carries out a 365-day calculation for a mass-balance model. Basically, the model depends on 2 variables (p,
2003 Jul 15
7
Excel can do what R can't?????
Hi there I thought this would be of particular interest to people using 'optim' functions and perhaps people involved with R development. I've been beaten down by R trying to get it to perform an optimization on a mass-balance model. I've written the same program in excel, and using the 'solver' function, it comes up with an answer for my variables (p, ACT, which
2003 Jun 30
0
Constructing loops in which i+1st element depends on ith
I feel greedy posting for help twice in one day- please forgive me, but the thesis can't wait. I have been trying to get an ?if else? statement working in a loop I am writing, in which I specify a variable value to 9.2 (Wo) on the first iteration, but for subsequent iterations, to adopt a value as a function of variables from the previous iteration. When I comment out the ?if else?
2003 Jul 01
2
strange error message
Hi, there I have a loop that is producing data, but is also generating an error message that I can't understand. Here's the loop and the error message: > bio<-matrix(NA, ncol=9, nrow=366) > W<-NULL > M<- length(Day) #number of days iterated > > for (i in 1:M) + { + + + if (Day[i]==1) W[i] <- Wo else W[i] <- (W[i-1]+(Gr[i]/Ef)) + + + C<-
2011 Jan 20
4
How to reshape wide format data.frame to long format?
Dear list, I need to convert this data.frame > names(codesM) [1] "key" "AMR.pa1.M" "AMR.pa2.M" "AMR.pa3.M" "AMR.pa4.M" [6] "AMR.pa5.M" "AMR.pa6.M" "AMR.pa7.M" "AMR.pa8.M" "AMR.pa9.M" [11] "AMR.pa10.M" "AMR.ta1.M" "AMR.ta2.M" "AMR.ta3.M"
2019 Jun 11
1
[PATCH 1/2] drm/nouveau/kms/gf119-: add ctm property support
This adds support on GF119:GV100 (exclusive) for CTM (aka CSC). Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- drivers/gpu/drm/nouveau/dispnv50/atom.h | 6 ++ drivers/gpu/drm/nouveau/dispnv50/base907c.c | 65 +++++++++++++++++++++ drivers/gpu/drm/nouveau/dispnv50/wndw.c | 13 +++++ drivers/gpu/drm/nouveau/dispnv50/wndw.h | 4 ++ 4 files changed, 88 insertions(+)
2009 Oct 05
2
how to document stuff most users don't want to see
The functions metrop and temper in the mcmc package have a debug = FALSE argument that when TRUE adds a lot of debugging information to the returned list. This is absolutely necessary to test the functions, because one generally knows nothing about the simulated distribution except what what one learns from MCMC samples. Hence you must expose all details of the simulation to have any hope of
2008 Oct 24
1
Repetitive correlation test
Dear all, Through the following code, I wanted to perform correlation test repetedly (through loop) on different combinations of variables of a data set. Code: x=read.table("sample.txt",header=T,sep="\t") out="corout.txt" sink(out) nm = names(x) print(nm) nvr=3 # nvr=Total no. of variables in the input data file for (i in 1:(nvr-1)) { for(j in (i+1):nvr) { frm=
2012 Sep 15
1
Interpretation of result in R
I am trying to do a quasipoisson regression to know if the frequency of drinking of my subject is related to temperature. The problem is that I'm not sure how to interpret my result. 1) Since my result is signifiant, can I tell that the frequency of drinking of my subject increase linearly or exponentially? 2) When I want to quantify the increase, do I need to do an exponential
2013 Mar 07
5
multiple plots and looping assistance requested (revised codes)
Hi Irucka, I tried it and was able to plot it without any errors.? Here, your code indicates you need two lines. temper[[i]][1] ?temper[[1]][1] # which is the column 1. ? Month 1???? 1 2???? 2 3???? 3 ?temper[[1]][2] #? Data1 #1?? 1.5 #2? 12.3 #3? 11.4 Suppose I use names(temper) instead of seq_along(temper) pdf("irucka.pdf") ?lapply(names(temper),function(i)
2000 Oct 03
1
Various platforms
Hello, I've been compiling OpenSSH up on just about every platform that I can get my hands on. I am not certain of the best way of building my 'fixes' into the source tree, not least of all since I didn't worry about #ifdef's or the configure scripts. However hopefully this will be of use to you. This is all for openssh-2.2.0p1 compiled alongside openssl-0.9.5a and
2006 Dec 14
2
604995471 7500 routers / upgrade issue
Hi Benjamin: I think that the following link will give you an idea for what you need to know: http://www.cisco.com/warp/customer/620/roadmap_b.shtml This is for the naming: http://www.cisco.com/en/US/products/sw/iosswrel/ps1818/products_tech_note09186a0080101cda.shtml In this case 11.1CC goes to 12.0T and 12.0T migrate to 12.1 mainline. Do not you worry you will not loose anything with the new
2009 Jul 16
0
[LLVMdev] please stabilize the trunk
Bill Wendling wrote: > Things get really out of hand (and I tend to lose my temper and write > hotly worded emails) when things obviously break, and the build bots > send out emails about these breakages, but people ignore them, and the > build is broken for half a day or more. This morning, I got to the > office and couldn't build TOT, it was so bad. So... what's the
2008 Apr 28
1
Monday, April 28 - Samba Mashup Report
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ** Samba Mashup Report (SMR) for Monday April 28, 2008 ** Table of Contents: 0. Greetings to the Inaugural SMR (samba Mashup Report) 1. Plans in Motion for 6 Month Samba 3.x Release Cycles 2. Samba 3.2.0pre3 Released 3. Samba XP 2008 Concludes as YASC (yet another successful conference) 4. Samba Documentation repository moved from SVN
2009 Jul 16
3
[LLVMdev] please stabilize the trunk
On Jul 15, 2009, at 7:52 PM, Nick Lewycky wrote: > 2009/7/15 Dale Johannesen <dalej at apple.com> > > On Jul 15, 2009, at 4:48 PMPDT, Daniel Dunbar wrote: > > > That depends on what you call a false positive. The public buildbot > > regularly fails because of mailing Frontend tests, and I have had > > continues failures of some DejaGNU tests for a long time on
2019 Jun 12
0
[PATCH v2] drm/nouveau/kms/gf119-: add ctm property support
This adds support on GF119:GV100 (exclusive) for CTM (aka CSC). Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- v1 -> v2: - ctm -> csc - mark csc.valid = false when there is no ctm property drivers/gpu/drm/nouveau/dispnv50/atom.h | 6 ++ drivers/gpu/drm/nouveau/dispnv50/base907c.c | 65 +++++++++++++++++++++ drivers/gpu/drm/nouveau/dispnv50/wndw.c | 16 +++++
2005 Sep 23
1
***SPAM*** help
vorbisHi Sorry if it is too stupid to ask the following questions. I am just confused by the pychoacoustics model. I think the computation in the psy.c is to derive a curve which stands for the threshold for the mdct coefficient. Is it right ? If it is right , then what can we do with the curve ? I refered to several articles and find the aim of most pychoacoustics model was to derive the SMR
2008 Feb 07
1
Bode plots in ggplot2
Hello, I am trying to figure out how to make a bode plot (a.k.a. bode diagram) in ggplot2. An example of such a diagram can be found here: http://meweb.ecn.purdue.edu/~me475/ctm/freq/bode2.GIF The example above shows the gain and phase characteristic of a linear system. In my case, I would like to compare visually several systems on the same diagram. The data in the data frame is arranged
2004 Oct 26
5
please test: Secure ports tree updating
CVSup is slow, insecure, and a memory hog. However, until now it's been the only option for keeping an up-to-date ports tree, and (thanks to all of the recent work on vuxml and portaudit) it has become quite obvious that keeping an up-to-date ports tree is very important. To provide a secure, lightweight, and fast alternative to CVSup, I've written portsnap. As the name suggests, this
2006 May 28
2
"if" clause in the view - - - (for two objects)
Hi, sorry to bother you guys with a simple sytnax question; i have a loop of objects taking place (ie, for page in @pages....xxxxxxx....end) and a link associated to each pages so that in the end it looks like this: page1 (link) page2 (link) page3 (link) . . . page n (link) (all of this done by putting a simple ''link to'' in the for loop.) now i need to seperate two pages