similar to: Alternating between "for loops"

Displaying 20 results from an estimated 2000 matches similar to: "Alternating between "for loops""

2010 Jul 06
2
How to plot confidence bands for nls
I adjusted an exponential regression to the following data and wish to plot confidence bands as well. Is this possible? Any help greatly appreciated. Claudia x <- c(1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001, 2002,2003,2004,2005,2006,2007,2008,2009) y <- c(987,937,810,749,1087,807,1050,1294,1455,1022,927,403,698,1191,1078, 1176,1125,936,1263,647,868) dat <-
2012 Jul 02
4
Removing rows if certain elements are found in character string
I would like to remove rows from the following data frame (df) if there are only two specific elements found in the df$ch character string (I want to remove rows with only "0" & "D" or "0" & "d"). Alternatively, I would like to remove rows if the first non-zero element is "D" or "d".
2010 May 03
1
rpart, cross-validation errors question
I ran this code (several times) from the Quick-R web page ( http://www.statmethods.net/advstats/cart.html) but my cross-validation errors increase instead of decrease (same thing happens with an unrelated data set). Why does this happen? Am I doing something wrong? # Classification Tree with rpart library(rpart) # grow tree fit <- rpart(Kyphosis ~ Age + Number + Start,
2010 May 14
1
Cubic B-spline, how to numerically integrate?
(corrected version of previous posting) I fit a GAM to turtle growth data following methods in Limpus & Chaloupka 1997 (http://www.int-res.com/articles/meps/149/m149p023.pdf). I want to obtain figures similar to Fig 3 c & f in Limpus & Chaloupka (1997), which according to the figure legend are "expected size-at-age functions" obtained by numerically integrating
2010 May 13
1
GAM, GAMM and numerical integration, help please
I am trying to apply methods used by Chaloupka & Limpus (1997) ( http://www.int-res.com/articles/meps/146/m146p001.pdf) to my own turtle growth data. I am having trouble with two things... 1) After the GAM is fit, the residuals are skewed. >m1 <- gam(growth~s(mean.size, bs="cr")+s(year,bs="cr",k=7)+s(cohort,bs="cr")+s(age,bs="cr"), data=grow,
2012 Aug 01
2
plotting 0,1 data
Hello, Anyone know why the command: > plot(x,y) where y is a 0,1 result sometimes plots the y values as 1,2 rather than 0,1? And how to prevent this? Thank you, Georgiana May [[alternative HTML version deleted]]
2012 May 07
2
Matrix "BYTES" size
Dear R people. I´m facing a big problem. I need to create a matrix with 10.000 columns and 750.000 rows. matrix<- as.data.frame(matrix(data=0L, nrow=750000, ncol=10000) as you can see, the data frame has huge dimesions. I was able to find out about thr "L" in data, this way I´m telling that my data is "integer" class. By doing this object.size(matrix) tells me that this is
2012 Apr 30
2
Generate Dendrogram
Hi I have a distance matrix which is computed by user defined method. I would like to plot the dendrogram. I would like to use different color and want the leaves laying down bottom. The script like this. I am not familiar with R. I followed the example shown in http://stat.ethz.ch/R-manual/R-devel/library/stats/html/dendrogram.html dist.obj <- as.dist(matrix.distance) hc.obj <-
2012 May 17
3
New Eyes Needed to See Syntax Error
One of many scripts to produce 4 lattice plots on one page keeps throwing an error. I've tried manipulating the file to eliminate the error, but have not been able to do so. The error is: > source('bicarb.R') Error in source("bicarb.R") : bicarb.R:15:1: unexpected symbol 14: 15: hco33 ^ The 'h' is in column 0 so the caret would be column -1, but it's
2012 May 08
3
Unexpected input while building package in R
I am a newbie in R, and I am trying to build an R package but I keep getting an unexpected input error when I try using the build, check or install commands. I used the following command to generate the skeleton: package.skeleton("test") After this I went to the command prompt and to the directory with the test folder and ran the command: R CMD build test I got the following error
2012 Aug 29
5
Extracting the name of a function (inverse of match.fun("myFun"))
Hi all, is there a way to extract the name of a function, i.e. do the reverse of match.fun applied to a character string? I would like to print out the name of a function supplied to another function as an argument. For example: myFunc = function(x) { x+1 } applyFunc = function(fnc, x) { fnc = match.fun(fnc) fnc(x) } Is there a way to obtain "myFunc" from the argument fnc in
2018 May 30
2
Evaluation failure of IAPWS95 functions in a rowwise manner (tidyverse style)
I'm trying to use the IAPWS95 package with the tidyverse packages. For some reason, the function is not outputting the correct rho. A minimal example with results is below. I've also included the definition of the DTp function from the IAPWS95 library. ==================================== library(IAPWS95) library(tidyverse) initial <- data.frame(T=c(279,294),p=c(0.46,0.46))
2018 May 30
0
Evaluation failure of IAPWS95 functions in a rowwise manner (tidyverse style)
Hi Shawn, I don't think it has anything to do with the tidyverse. If you keep simplifying your example you'll get all the way down to > DTp(T=c(279,294),p=c(0.46,0.46)) [1] 1000.12283 --Ista On Wed, May 30, 2018 at 2:14 PM, Shawn Way <SWay at meco.com> wrote: > I'm trying to use the IAPWS95 package with the tidyverse packages. For some reason, the function is not
2008 Jul 24
5
printa stddev error
Hi, Searched for similar errors and nothing came up. Anybody know what this is? When using aggregate stddev, and then trying to print it at END, using printa, I get this error: dtrace: processing aborted: Invalid return value from callback avg works fine. Tried on two recent builds of solaris (build 89 and build 94), on two difference sparc systems. Here''s a sample script:
2013 Jun 19
1
SIP Simple support on Asterisk 11
Hi all, I am trying to enable SIP SIMPLE communication in my test environment. I have the following env : - one server (192.168.50.126) with Asterisk 11 - 2 clients using pidgin : demo-bob and demo-alice on my 192.168.50.143 I successfully had a phone call between clients. I used the following link to enable SIMPLE messaging between my clients :
2005 Nov 02
3
Printing under wine
Hi, Bit of a newbie here, I've checked the FAQ, and some srchives, but haven't found an answer. I have a Windows DTP application, which runs quite well under wine 9.0 (Mandriva Linux 2005SE), but when tryimg to print, dumps with a stack backtrace. So I thought I'd try printing from the wine-supplied notepad; this doesn't even come up with a printer list. I can't believe
2001 Nov 13
1
models for polytomous data
Hi all I have a dataset whose response is a categorical variable of the ordinal scale type (6 levels). I'm interested in building classification models, and I'm wondering if there is something implemented in R (or its packages) that I'm not aware of, to treat the ordinal scale measurements straightforwardly. I can think of the alternative of building a conditional (hierarchical)
2007 Jan 04
5
color of opposite sign values in filled.contour
Dear R-helpers, I'm plotting geophysical data in the form of contours using "filled.contour". The display would be much more effective if the areas with negative values could be color coded by -- say -- "cold colors" in the range of blue to green, and conversely the areas with positive values got plotted with "warm colors", from yellow to red. Right now if I use
2004 Feb 24
7
<no subject>
Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hypatia.math.ethz.ch X-Spam-Status: No, hits=3.5 required=5.0 tests=BAYES_44,RCVD_IN_BL_SPAMCOP_NET autolearn=no version=2.63 X-Spam-Level: *** Dear ladies and gentlmen, I want to import a directory with about 400 files (.dat) in R. I know how to
2010 Oct 28
3
help with help()
Hi all Just this morning I upgraded to R 2.12.0 (for Mac OS X 10.6.4). All went well until I needed to run a help() or help.search() in my session, which I'm running within Emacs (ESS 5.3.7). Say I need help with the command 'density'. When I type help(density) or ?density the ESS help buffer opens, it is titled *help[R](density)* but it contains only a couple of lines saying,