similar to: for loop with if statment problem

Displaying 20 results from an estimated 700 matches similar to: "for loop with if statment problem"

2010 Feb 03
1
Additional field data collection
This is a subset of a much larger dataframe. I would like to be able to automate finding the pair of x, y coordinates where the line crosses zero agian x <- (structure(list(bankfull_depths_m = c(0, 0.17, 0.38, 0.37, 0.36, 0.39, 0.47, 0.48, 0.19, 0.05, -0.05, -0.09), measurment_num_m = c(0.2, 0.4, 0.6, 0.8, 1, 1.2, 1.4, 1.6, 1.8, 2, 2.2, 2.4)), .Names = c("bankfull_depths_m",
2010 Sep 15
1
approxfun returning value higher than I would expect
Below is the code that I am using in a much larger function. I would expect a bankfull measure at zero to be between 0.6 and 0.8 approxfun is returning 0.8136986. I am sure that I am missing something. measure_bkf <- (structure(list(measurment_num = c(0, 0.2, 0.4, 0.6, 0.8, 1, 1.2, 1.4, 1.6, 1.8, 2, 2.2, 2.4, 2.6, 2.8, 3, 3.2, 3.4), bankfull_depths_m = c(-0.48, -0.48, -0.42, -0.26, 0.58,
2010 Jul 18
2
NA preserved in logical call - I don't understand this behavior because NA is not equal to 0
I am confused by the behavior of the below piece of code. The NAs are making it past the logical call ==0. I am sure that I am missing something. I just don't understand this behavior. Thanks for your help in advance. ########code####################################################### left <- (structure(list(measurment_num = c(2, 2.2, 2.4, 2.6, 2.8, 2.82, 3, NA, NA, NA),
2013 May 29
0
[LLVMdev] Polyhedron 2005 results for dragonegg 3.3svn
On Wed, May 29, 2013 at 03:25:30PM +0200, Duncan Sands wrote: > Hi Jack, I pulled the loop vectorizer and fast math changes into the 3.3 branch, > so hopefully they will be part of 3.3 rc3 (and 3.3 final!). It would be great > if you could redo the benchmarks rc3. > Duncan, As requested, appended are the updated Polyhedron 2005 benchmark results with both RC1 and RC3 llvm 3.3
2007 Nov 12
1
Tick mark puzzle.
I am bewildered by the behaviour of tickmarks as demonstrated by the following code. (What I'm trying to do is draw a single tick mark extending from the axis all the way down to the tick label, which is two lines from the axis to make sure it doesn't overlap with the ``ordinary'' tick labels.) # Try 1: # Gap between tickmark and label. plot(1:10) axis(side = 1, at = 2.35,
2011 Aug 16
1
Utilizing column names to multiply over all columns
## Hello there, ## I have an issue where I need to use the value of column names to multiply with the individual values in a column and I have many columns to do this over. I have data like this where the column names are numbers: mydf <- data.frame(`2.72`=runif(20, 0, 125), `3.2`=runif(20, 50, 75), `3.78`=runif(20, 0, 100), yy=
2007 Dec 08
0
help for segmented package
Hi, I am trying to find m breakpoints of a linear regression model. I used the segmented package. It works fine for small number of predicators and breakpoints.(3 r.v. 3 points). However, my model has 14 variables it even would not work even for just one breakpoints!. The error message is always estimated breakpoints are out of range. Since my problem is time related problem. So I
2007 May 12
2
Implicit vs explicit printing and the call stack
Hi everyone, I've run into a bit of strange problem with implicit vs explicit printing and the call stack. I've included an example at the bottom of this email. The basic problem is that I have an S3 object with a print method. When the object is implicitly printed (ie. typed directly into the console) the function arguments in the call stack are exploded out to their actual values,
2013 May 23
4
[LLVMdev] Polyhedron 2005 results for dragonegg 3.3svn
Below are the results for the Polyhedron 2005 benchmarks compiled with llvm/compiler-rt/dragonegg 3.3svn at r182439 against current FSF gcc 4.7.3svn and 4.8.1svn. The only major bug remaining in the dragonegg 3.3svn support for gcc 4.8.x is http://llvm.org/bugs/show_bug.cgi?id=15980 which results in unresolved symbols for _iround and _iroundf in the aermod and rnflow testcases. Note that this
2012 Nov 25
1
Multiple Range Means Test
Hello, My boss wants me to do a Duncan's test, which is under the agricolae package. Unfortunately I am not versed enough in R to run my data. I have 7 subspecies of deer mouse for which I have 23 measurements which are my variables of interest. I have run an ANOVA for each of the set of subspecies and variables, my data look like this: subspecies WMF 1 rowleyi 2.50 2 rowleyi 2.30
2011 Jul 20
2
Bootstrap
Hi all, I am facing difficulty on how to use bootstrap sampling and below is my example of function. Read a data , use some functions and use iteration to find the solution( ie, convergence is reached). I want to use bootstrap approach to do it several times (200 or 300 times) this whole process and see the distribution of parameter of interest. Below is a small example that resembles my
2013 Feb 02
1
Mixed Models: Contribution of random variable to final estimate
Dear all, We want to test if the invasiveStatus is predicted by the amount (quant) of animals arriving to a country of a certain species (taxonid). We are using lmer to perform the model. The model is: lmer(invasiveStatus~I(log(quant+1))+I(log(inDegree+1))+(1|taxonid)+(1|country), family=binomial,data=td), where invasiveStatus is a binary variable, quant and inDegree are integer variables, and
2009 Nov 22
1
Input file format to Anova from car package
Dear list member, My question is related to input file format to an Anova from car package. Here is an example of what I did: My file format is like this (and I dislike the idea that I will need to recode it): Hormone day Block Treatment Plant Diameter High N.Leaves SH 23 1 1 1 3.19 25.3 2 SH 23 1 1 2 3.42 5.5 1 SH 23 1 2 1 2.19 5.2 2 SH 23 1 2 2 2.17 7.6 2 CH 23 1 1 1 3.64 6.5 2 CH 23 1 1 2
2000 Nov 09
2
Expressions in plots
Perhaps there is an obvious answer to this, but I can't seem to figure it out. I want to generate a sequence of plots, where a variable (say x) is changed from plot to plot. For each plot I'd like to have a title indicating the value of x. However, what I really want is to use expression to typeset some math. A simple example is I'd like to do something like expression(mu==x), where
2009 Jul 21
1
problem with heatmap.2 in package gplots generating non-finite breaks
I have written a wrapper for heatmap.2 called heatmap.w.row.and.col.clust which auto-generates breaks using breaks<-round((c(seq(from=(-20 * stddev), to=(20 * stddev))))/20, digits = 2) #(stddev in this case = 2.5) This has always worked well in the past but now I am getting an error that non-finite breaks are being generated. Drilling down, it seems that my wrapper is generating finite
2011 Mar 21
1
value changed after paste() function
Hi all, I am new user in R, I am trying to to use paste function to concatenate strings which has been fetched from database table(postgres database), the following are my code: when i do: > sqlFetch(channel,'transactions') outputs are following(only parts, there are around 200 transactions in total) orderid productname price quantity discount 1 T10248 potato 1.80
2014 Feb 04
2
Upgrading Perl (modules) / RequestTracker
I'm attempting to install RequestTracker on CentOS 6.5. Running "make testdeps" as recommended by RT's installation guide, I'm presented with lists of missing Perl modules. One of these lines reads: Encode >= 2.39 ...MISSING Now, "yum whatprovides '*/Encode.pm' " informs me that that module is part of the core Perl distribution, and is
2004 Jan 02
3
Slow wiki?
Hi there, is this a problem with the Wiki software or the DB? The delay is still tolerable, but not exactly nice to work with. http://www.voip-info.org/tiki-index.php?page=Asterisk+billing Page generated in: 2.35 seconds Philipp
2005 Jun 28
3
PESQ results for speex 1.0.3
Hello! Some time back, I added the Speex protocol to my version of VOCAL (www.vovida.org, VOIP tool). Recently, I also added PESQ (automated voice quality testing algorithm) to my tool and have been running some tests on a clean network. The source file is a woman reading some phrases meant to test various aspects of codecs... Speex has a respectable result of 3.67 Some other codecs I've
2017 Oct 20
3
nls() and loop
Hello I?m need fitt growth curve with data length-age. I want to evaluate which is the function that best predicts my data, to do so I compare the Akaikes of different models. I'm now need to evaluate if changing the initial values changes the parameters and which do not allow to estimate the model. To do this I use the function nls(); and I randomize the initial values (real positive number).