similar to: getting variable length numerical gradient

Displaying 20 results from an estimated 10000 matches similar to: "getting variable length numerical gradient"

2006 May 18
2
extracting values from data.frame given arbitrary keys
Hi all. I have a pure R programming question. Having a data.frame with a 'data' variable and some (>1) ID variables (either numeric or factors), I would extract a sequence of data values given a sequence of ID values. Here's an example. Build a dataset: n1 <- 5 n2 <- 2 v1 <- rep(factor(1:n1),2) v2 <- rep(1:n2,5) x <- rnorm(10) dat <- data.frame(x=x, v1=v1, v2=v2)
2005 Sep 21
3
ts.intersect bug?
This code gives an error: a <- ts(1:10, start=0, freq=10) b <- ts(1:10, start=1, freq=10) ts.intersect(a,b) This one works normally (and correctly): a <- ts(1:10, start=0) b <- ts(1:10, start=1) ts.intersect(a,b) Antonio, Fabio Di Narzo. P.S. How to switch off italian error messages to post on r-help? > version _ platform i386-pc-mingw32 arch i386 os
2007 Dec 04
2
Wishlist: mention Vectorize in 'outer' man page (PR#10490)
Full_Name: Antonio, Fabio Di Narzo Version: 2.6.1 OS: linux Submission from: (NULL) (213.140.16.187) In 'outer' man page, there is no mention of the Vectorize function. Moreover, I think it isn't underlined enough that the FUN argument to 'outer' must be a vectorized function (doc speaks about a function which has to 'operate elementwise'). A cross-reference from
2007 Nov 24
2
unexpected result from reshape
Hi all. I have unexpected reshape results on datasets with certain variable names. Here a reproducible example: d <- matrix(seq_len(7*7), 1, 7*7) vnames <- c('acc','ppeGross','CF','ROA','DeltaSales','invTA','DeltaRevDeltaRec') varying <- unlist(lapply(vnames, paste, 1:7, sep='.')) d <- data.frame(d) names(d) <- varying
2006 May 25
3
missed ylim from plot.default
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060525/ef972e9f/attachment.pl
2005 Dec 13
1
bug in geoR (?)
I've enconuntered this problem with the last cran version of geoR: > library(geoR) > day <- rep(1:2, each=5) > coords <- matrix(rep(runif(10),2), 10, 2) > data <- rnorm(10) > data[1] <- NA > as.geodata(cbind(coords, data, day), realisations=4) as.geodata: 1 points removed due to NA in the data Errore in as.geodata(cbind(coords, data, day), realisations = 4) :
2006 Mar 24
3
bug in plot.acf (PR#8705)
(Moved from r-devel to r-bugs) On 3/24/2006 5:03 AM, Antonio, Fabio Di Narzo wrote: > Hi all. > There's a bug in plot.acf, when plotting acf for multivariate time series. > Here a reproducible example: > > X <- rnorm(1000) > Y <- -X + rnorm(1000, sd=0.6) > Z <- cbind(X,Y) > > In > acf(Z) > cross-correlation plot y-axis is limited to 0-1. But: >
2011 Mar 19
2
problem running a function
Dear people, I'm trying to do some analysis of a data using the models by Royle & Donazio in their fantastic book, particular the following function: http://www.mbr-pwrc.usgs.gov/pubanalysis/roylebook/panel4pt1.fn that applied to my data and in the console is as follows: > `desman.y` <- structure(c(3L,4L,3L,2L,1L), .Names = c("1", "2", "3",
2008 Mar 21
1
idea for GSoC: an R package for fitting Bayesian Hierarchical Models
Dear R developers, these days I'm working on some R code for fitting completely generic Bayesian Hierarchical Models in R, a la OpenBUGS and JAGS. A key feature of OpenBUGS and JAGS is that they automatically build an appropriate MCMC sampler from a generic model, specified as a directed acyclic graph (DAG). The spirit of my (would-be) implementation is instead more focused on experimentation
2008 May 06
3
a R_PV problem
Dear all, When using gdb to debug my C code, I use R_PV to show the content of SEXP variables: SEXP sexp; // it is a data.frame SEXP colNames = getAttrib(sexp, R_NameSymbol); A strange thing is that after halting the program: (gdb) p R_PV(colNames) does not show the content of colNames. I am positive my code is right because if I insert "PrintValue(colNames);" in the c code,
2006 Apr 27
2
as.factor: changed behaviour for Date class
Dear all, I have noticed a little change in the behaviour of as.factor from R-2.2.1 to R-2.3.0, and can't find it in the NEWS. In R-2.3.0: > times <- 1:5 > class(times) <- "Date" > as.factor(times) [1] 1 2 3 4 5 Levels: 1 2 3 4 5 In R-2.2.1: > as.factor(times) [1] 1970-01-02 1970-01-03 1970-01-04 1970-01-05 1970-01-06 Levels: 1970-01-02 1970-01-03 1970-01-04
2006 Apr 27
2
as.factor: changed behaviour for Date class
Dear all, I have noticed a little change in the behaviour of as.factor from R-2.2.1 to R-2.3.0, and can't find it in the NEWS. In R-2.3.0: > times <- 1:5 > class(times) <- "Date" > as.factor(times) [1] 1 2 3 4 5 Levels: 1 2 3 4 5 In R-2.2.1: > as.factor(times) [1] 1970-01-02 1970-01-03 1970-01-04 1970-01-05 1970-01-06 Levels: 1970-01-02 1970-01-03 1970-01-04
2007 Jun 28
4
compare 2 vectors
Dear all, I would like to take out the values from one vector that are equal to the values in another vector. Example: a <- c(1,2,3,4,5,6,7,8,9) b <- c(3,10,20,5,6) b_noRepeats = c(10,20) So I would like to have the vector b without the same values as vector a. Kind regards, João Fadista [[alternative HTML version deleted]]
2006 Dec 18
3
turning expression object to function
Dear all, I have the following problem. Given an expression object 'expr' containing a certain set of symbols (say 'a', 'b', 'c'), I would like to translate the expression object in an R function of, say, 'a', programmatically. Here an example of what I mean. Given: > expr <- expression(a+b+c) a call like: > asFunctionOf(expr, 'a',
2007 Dec 13
1
creating lagged variables
Hi all. I'm looking for robust ways of building lagged variables in a dataset with multiple individuals. Consider a dataset with variables like the following: ## set.seed(123) d <- data.frame(id = rep(1:2, each=3), time=rep(1:3, 2), value=rnorm(6)) ## >d id time value 1 1 1 -0.56047565 2 1 2 -0.23017749 3 1 3 1.55870831 4 2 1 0.07050839 5 2 2 0.12928774 6
2008 Dec 07
1
unexpected scoping behavior with functions created in a loop
Hi guys. I recently stumbled on an unexpected behavior of R when using functions created in a loop. The problem is silly enough to me that I had hard time choosing a good mail subject, not talking about searching in the archives... After some experiments, I trimmed down the following minimal reproducible example: ####### makeF <- function(i) function() i fList <- list(makeF(1), makeF(2))
2007 May 13
1
adding custom details to ggplot subplots
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070513/ab60c7ed/attachment.pl
2007 May 13
2
suppressing outliers in ggboxplot
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070513/473acf08/attachment.pl
2006 Jun 04
1
strange (to me) ncolumns default value in 'write'
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060604/a8854663/attachment.pl
2006 Mar 15
1
variance from correlated observations
Hi all. A statistical question. I have to estimate the variance of the sum: X(1) + X(2) + ...+ X(n) from an observed sample, where X(i) are *correlated* and not necessarly identically distributed. Someone can suggest a simple strategy (I hope by exploiting some already present R package) for obtaining such estimate from an observed vector X[1:n]? Tnx all, Antonio, Fabio Di Narzo.