Displaying 20 results from an estimated 10000 matches similar to: "extracting values from data.frame given arbitrary keys"
2005 Sep 25
2
getting variable length numerical gradient
Hi all.
I have a numerical function f(x), with x being a vector of generic
size (say k=4), and I wanna take the numerically computed gradient,
using deriv or numericDeriv (or something else).
My difficulties here are that in deriv and numericDeric the function
is passed as an expression, and one have to pass the list of variables
involved as a char vector... So, it's a pure R programming
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
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.
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
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:
>
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
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',
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 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
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 20
3
create a gui with a button to change graphic?
Hello everybody,
I am wondering if it is possible to create a gui to plot a time series
that is very big, it's an EEG signal of 20mins. What I would like to do
is plot the first 5mins, then have a button on the gui that plots the
next 5mins when pushed.
Is it possible?
Thanks in advance !
Gael.
2006 Nov 23
1
dumping/loading objects with 'tsp' attribute
Dear all,
I'm indirectly faced with the fact that setting the 'tsp' attribute of
an object modifies its class definition:
> class( structure(1:2, tsp=c(1,2,1), class=c("myts","ts")) )
[1] "ts" "myts"
In general, this is of really little (ok, I admit: totally no)
interest for me because 'myts' class is added just after assigning the