similar to: sapply problem

Displaying 20 results from an estimated 10000 matches similar to: "sapply problem"

2006 Mar 08
3
bug in map('world') ?
hi, did'nt see anything in the archive: map('world',pro='rectangular',para=0) yields a strange artifact (horizontal bar) extending over the whole map at a certain latitude range (approx 65 deg. north), whereas map('world',pro='rectangular',para=180) (which should be the same) does not show the artifact. the artifact shows up in other projections as well,
2004 Aug 13
2
bus error /segmentation fault from 'approx' (PR#7166)
Full_Name: joerg van den hoff Version: 1.9.0 and 1.7.1 OS: MacOS (1.9.0), SunOS (1.7.1) Submission from: (NULL) (149.220.4.88) something like (sure not the originally intended input, but something like this can happen...): approx(c(1,2),c(NA,NA),1.5) crashes R (bus error under MacOS, segmentation fault under SunOS). search of the bug archive did not work. I hope this bug was not reported
2005 Oct 10
2
problem with lapply(x, subset, ...) and variable select argument
I need to extract identically named columns from several data frames in a list. the column name is a variable (i.e. not known in advance). the whole thing occurs within a function body. I'd like to use lapply with a variable 'select' argument. example: tt <- function (n) { x <- list(data.frame(a=1,b=2), data.frame(a=3,b=4)) for (xx in x) print(subset(xx, select = n))
2004 Jun 08
2
Is there an R-version of rayplot
I need to make plots similar to those produced by the s-plus rayplot function but can't seem to find it in R. These 'vector maps' plot a ray or vector at each specified location. Is there something similar in R ? --Rich Richard Kittler AMD TDG 408-749-4099
2006 Jun 29
1
inconsistent matplot behaviour?
I raised this question quite some time ago but it quitly went down the river. I'll give it a second try (before keeping my modified version of matplot for ever...): matplot supports vectors (and/or character strings) for a number of arguments namely `type', `lty', `lwd', `pch', `col', `cex'. all of them act consistently in such a way that the first entries are used
2004 Aug 16
3
bus error /segmentation fault from 'approx' (PR#7177)
Full_Name: joerg van den hoff Version: 1.9.1 OS: MacOS and SunOS Submission from: (NULL) (149.220.4.88) follow up to ID 7166. something like approx(c(1,2),c(NA,NA),1.5,rule=2) crashes 1.9.1 on both systems (MacOS 10.3.5.: bus error, SunOS 5.9: segmentation fault) even if xout is within given x range (as in example above) where rule=2 seems not be relevant anyway.
2006 Aug 24
4
extremely slow recursion in R?
I recently coded a recursion algorithm in R and ir ran a few days without returning any result. So I decided to try a simple case of computing binomial coefficient using recusrive relationship choose(n,k) = choose(n-1, k)+choose(n-1,k-1) I implemented in R and Fortran 90 the same algorithm (code follows). The R code finishes 31 minutes and the Fortran 90 program finishes in 6 seconds. So the
2005 Jul 13
1
unexpected par('pin') behaviour
hi everybody, I noticed the following: in one of my scripts 'layout' is used to generate a (approx. square) grid of variable dimensions (depending on no. of input files). if the no. of subplots (grid cells) becomes moderately large (say > 9) I use a construct like ###layout grid computation and set up occurs here### ... opar <- par(no.readonly = T);
2006 Jun 20
2
$
If object is user defined is: object$df.residual the same thing as df.residual(object) This is my first time to encounter the $ sign in R, I'm new. I'm reviewing "summary.glm" and in most cases it looks as though the $ is used to extract some characteristic/property of the object, but I'm not positive. Thanks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2012 Jul 03
1
nls problem
hi list, used versions: 2.12.1 and 2.14.0 under ubuntu and macosx. I recently stumbled over a problem with `nls', which occurs if the model is not specified explicitly but via an evaluation of a 'call' object. simple example: 8<-------------------------------------------------------------------------------------- nlsProblem <- function (len = 5) {
2007 Feb 21
1
Confindence interval for Levenberg-Marquardt fit
Dear all, I would like to use the Levenberg-Marquardt algorithm for non-linear least-squares regression using function nls.lm. Can anybody help me to find a a way to compute confidence intervals on the fitted parameters as it is possible for nls (using confint.nls, which does not work for nls.lm)? Thank you for your help Michael
2002 May 02
2
coercing "numeric" components of data frame to "factor" or "ordered"?
I am getting ready to load a bunch of data into R. The data is all numeric, but some of the numbers are integer codes representing non-numeric semantics. What is the best way to "fix" the data frames so that these compenents are recognized as "factors" or "ordered", as appropriate? Can I "assign" to some attribute of the data frame component, like the
2009 Sep 28
2
probability density function for maximum values in repeated finite samples from a normal distribution??
this is probably not really a R specific question, if so apologies for off-topic posting: I'm interested in the probability density function of the maximum values from repeated samples of size N from a normal distribution: smp <- rnorm(N, meanval, stdev) with some mean 'meanval' and standard deviation 'stdev'. I would like to know what is the frequency distribution of
2006 May 05
2
boxplot - labelling
Hi, How can I get the values of mean and median (not only points but values too) on the boxplot. I am using boxplot function from graphics package. Following is my data set > df [1] 5 1 1 0 0 10 38 47 2 5 0 28 5 8 81 21 12 9 1 12 2 4 22 3 > mean.val <- sapply(df,mean) > boxplot(df,las = 1,col = "light blue") > points(seq(df), mean.val,
2006 Aug 17
2
getting sapply to skip columns with non-numeric data?
getting s-apply to skip columns with non-numeric data? I have a dataframe ?x? of w columns. Some columns are numeric, some are not. I wish to create a function to calculate the mean and standard deviation of each numeric column, and then ?bind? the column mean and standard deviation to the bottom of the dataframe. e.g. tempmean <- apply(data.frame(x), 2, mean, na.rm = T) xnew <-
2013 Nov 08
1
how to derive true surface area from `computeContour3d' (misc3d package) -- follow up
regarding my previous mail for this topic, I have in the meantime identified my misconception. actually, `computeContour3d' returns the vertices just fine in the correct coordinate frame. the misconception was caused basically by assuming that the `level' argument was a fractional threshold relative to the maximum of the array. so I believed that the rendered cube actually is
2005 Apr 04
3
Error in save.image(): image could not be renamed
Hello, I am doing intensive tests on SVMs parameter selection. Once a while I got the error: Error in save.image(): image could not be renamed and is left in .RDataTmp1 I cannot use the information saves in .RDataTmp1. When that happens I loose several hours of tests. It happens, ussualy when the computer is locked, i.e., there is not other relevant processes running on. I can do tests and get
2007 Nov 12
2
strange `nls' behaviour
I initially thought, this should better be posted to r-devel but alas! no response. so I try it here. sory for the lengthy explanation but it seems unavoidable. to quickly see the problem simply copy the litte example below and execute f(n=5) which crashes. called with n != 5 (and of course n>3 since there are 3 parameters in the model...) everything is as it should be. in detail:
2006 Mar 30
0
header containing 8713 (PR#8713)
I believe this was intended to be a followup to PR#8713 but has opened a new report, so I am replying to re-file it in the correct place. You can read the source code to find out what happens (as anyone else looking into this would need to). I currently have Argument \code{inches} controls the sizes of the symbols. If \code{TRUE} (the default), the the symbols are scaled so that the
2008 Jun 05
1
prevent `R CMD INSTALL' from reading `.Rprofile'
I tripped over the following problem: due to (my?) unresolved problems with cairo graphics under MacOS (graphic window blocks unrecoverably) I modified my `.Rprofile' to issue `X11(type = "Xlib")` on each R startup (as a workaround to automatic opening of a `cairo' device when issuing a plotting command). I now noted that `R CMD INSTALL' obviously