I'm interested in using a data frame as if it were a hash table. For
instance if I had the following,
> (d <- data.frame(key=seq(0.5, 3, 0.5), value=rnorm(6)))
keyvalue
1 0.5 -1.118665122
2 1.0 0.465122921
3 1.5 -0.529239211
4 2.0 -0.147324638
5 2.5 -1.531503795
6 3.0 -0.002720434
The
On Sun, May 30, 2010 at 9:03 AM, Alan Lue wrote:
> I'm interested in using a data frame as if it were a hash table. For
> instance if I had the following,
>
>> (d <- data.frame(key=seq(0.5, 3, 0.5), value=rnorm(6)))
> key value
> 1 0.5 -1.118665122
> 2 1.0 0.465122921
> 3 1.5 -0.52923921
You might want to investigate the 'data.table'
package.
On 30/05/2010 09:03, Alan Lue wrote:
I'm interested in using a data frame as if it were a hash table. For
instance if I had the following,
(d<- data.frame(key=seq(0.5, 3, 0.5), value=rnorm(6)))
keyvalue
1 0.5 -1.118665122
2 1
On Sat, 29 May 2010, Bryan Keller wrote:
Anyone know if coin can run a permutation test based on a (user-defined)
statistic other than the mean difference? The function
independence_test does the permutation t-test via difference in means.
...by default, that is.
I'm wondering if it's possi
On 05/29/2010 10:11 PM, dunner wrote:
... Perhaps "apply" simply doesn't deal with the colname and I have
to try a completely different method? Or will apply pass enough information
to the included function (mtab.norm) to allow me to annotate the plot?
It doesn't seem to, as I tried this on a d
Hi,
I want to fit a linear model (without any random effect) with method "ml". I
tried to use "glm" I found that there is no option for "ml" or "reml" and
the default one is "reml". THen I tried to use "lme" but it requires a
random effect. How can I fix this problem?
Of course, it's not necessa
On Sun, 30 May 2010, Sherrie Jin wrote:
Hi,
I want to fit a linear model (without any random effect) with method "ml". I
tried to use "glm" I found that there is no option for "ml" or "reml" and
the default one is "reml". THen I tried to use "lme" but it requires a
random effect. How can I fix
Why are you not using the lm() function? OLS is ML with no random effects
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of
Sherrie Jin [jingo...@gmail.com]
Sent: Sunday, May 30, 2010 5:05 AM
To: r-help@r-project.org
Subject: [R
i...@whywouldwe.com wrote:
Hi
The docs for R are very practical, which is quite refreshing compared to
other languages, however I can't find any details about all the things I
can do with a vector. I'm expecting methods like vector.contains('foo')
and vector.remove('foo'), maybe those methods
On May 29, 2010, at 11:37 PM, Kang Min wrote:
What if I want to select the 8th to 14th element of the list? I tried
to use "[" again, but it doesn't work.
x[8:14]
(And I could not get Iverson's earlier method to work properly on a
long list. It just returned the whole list. Did it work pro
On May 30, 2010, at 1:43 AM, i...@whywouldwe.com wrote:
Hi
The docs for R are very practical, which is quite refreshing
compared to other languages, however I can't find any details about
all the things I can do with a vector. I'm expecting methods like
vector.contains('foo') and vector.
Hi everyone,
it looks like geom_ribbon removes missing values and plots a single
ribbon over the whole interval of x values. However, I'd rather want it
to act like geom_line, that is, interrupt the ribbon for the interval of
missing values and continue once there are new values. Here's an example
Besides data.table, there's the hash package. It does not use data.frame
type structures but is a bit more flexible.
Marsh Feldman
On 5/30/10 [May 30, 10] 6:00 AM, r-help-requ...@r-project.org wrote:
Message: 40
Date: Sun, 30 May 2010 09:24:22 +0100
From: Patrick Burns
To:r-help@r-project.org,
Hi Stephan, thanks for your response.
It looks like the ecdf() works like it should.
I have a quick follow-up:
I didn't notice any discussion in the help documents of the methods
behind ecdf() and quantile(type=3) being equivalent.
It looks like the results produced by each method are consisten
Hmm x[8:14] didn't work. Yes Iverson's method worked, I wanted the
whole list, with 7 elements in each vector.
Now I want the whole list as well, but with the 8th to 14th element.
On May 30, 7:47 pm, David Winsemius wrote:
> On May 29, 2010, at 11:37 PM, Kang Min wrote:
>
> > What if I want to
Thanks for this, and all the other responses - I have a better
understanding now.
David Winsemius wrote:
On May 30, 2010, at 1:43 AM, i...@whywouldwe.com wrote:
Hi
The docs for R are very practical, which is quite refreshing compared
to other languages, however I can't find any details a
On May 30, 2010, at 9:44 AM, Kang Min wrote:
Hmm x[8:14] didn't work. Yes Iverson's method worked, I wanted the
whole list, with 7 elements in each vector.
Now I want the whole list as well, but with the 8th to 14th element.
Oh, ... then in what sense did the lapply method not work? What cod
On 26.05.2010 08:52, Alan Lue wrote:
Come to think of it, we can't save the output of each invocation and
concatenate it later, since we need the output as input for the next
iteration.
Yes, but you can do it a bit cleverer than before by initializing to the
fill length as in:
r.seq <- nu
Hi Kang,
Try either
lapply(x, "[", 8:14) # Erik Iverson's method
or
lapply(x, function(x) x[8:14])
HTH,
Jorge
On Sun, May 30, 2010 at 9:44 AM, Kang Min <> wrote:
> Hmm x[8:14] didn't work. Yes Iverson's method worked, I wanted the
> whole list, with 7 elements in each vector.
>
> Now I wa
Hi,
I have a data-frame, r (column names below), that needs subsetting:
date, time, strain, gene, deltact
When I try to subset r by applying selection criteria on two columns I get
an empty data frame. For example I would like to extract all rows that have
time == 0h and strain == ROC.
So, t <- s
I read the documentation below to mean that:
solve_TSP( tsp_input, '2-opt', rep=99 )
will use the 2-opt method on the tsp_input variable
99 times.
Catch: I get an "unused input" error.
Q: Am I reading the docs (Item 1, below) correctly or
is this a problem with solve_TSP ignoring its
On Fri, 28 May 2010 01:17:49 -0700 (PDT)
carslaw wrote:
> [4] "HGV-D-Euro-III" "HGV-D-Euro-IV EGR" "HGV-D-Euro-IV SCR"
> [4] "HGV-D-Euro-III" "HGV-D-Euro-IV EGR" "HGV-D-Euro-IV SCR"
> [7] "HGV-D-Euro-IV SCRb" "HGV-D-Euro-V EGR" "HGV-D-Euro-VI"
> [7] "HGV-D-Euro-IV SCRb" "HG
On May 30, 2010, at 9:03 AM, Jonathan Beard wrote:
Hi Stephan, thanks for your response.
It looks like the ecdf() works like it should.
I have a quick follow-up:
I didn't notice any discussion in the help documents of the methods
behind ecdf() and quantile(type=3) being equivalent.
It looks
Please tell us the code you used and we may be able to help you
interpreting the error message.
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Uwe Ligges
On 29.05.2010 23:05, anzid wrote:
hello
Thank you Uve ligges
The SimpleError is solved ( 1 data abscent )
thank you
--
View this message in context:
http://r.789695.n4.nabble.com/simpleError-in-storage-mode-y-tp2235745p2236367.html
Sent from the R help mailing list archive at Nabble.com.
___
Usually you will want to look at simple effects of the factors when there is
interaction. Please look at the WoodEnergy demos in the HH package.
These examples use glht.
install.packages("HH") ## if you don't currently have HH
library(HH)
demo("MMC.WoodEnergy-aov")
demo("MMC.WoodEnergy")
Rich
On 24.05.2010 03:59, Daisy Englert Duursma wrote:
Hello,
I am running R on a server that several people share. Previously we
all had separate libraries for R.
I have set up R so everyone on the server shares the same library and
I downloaded the latest version of R and installed it on the
main
It's been a few weeks I'm racking my brains on how to use the function glht
the package multcomp to test interactions. Unfortunately, the creator of the
package forgot to put a sample in pdf package how to do it. I have looked in
several places, but found nothing. If someone for the love of God ca
'&&' is scalar 'and' you want to use
the vector 'and' which is '&'.
On 30/05/2010 16:14, ANJAN PURKAYASTHA wrote:
Hi,
I have a data-frame, r (column names below), that needs subsetting:
date, time, strain, gene, deltact
When I try to subset r by applying selection criteria on two columns I get
On May 30, 2010, at 11:14 AM, ANJAN PURKAYASTHA wrote:
Hi,
I have a data-frame, r (column names below), that needs subsetting:
date, time, strain, gene, deltact
When I try to subset r by applying selection criteria on two columns
I get
an empty data frame. For example I would like to extrac
Thanks, guys!
Alan
On Sun, May 30, 2010 at 5:35 AM, Marshall Feldman wrote:
> Besides data.table, there's the hash package. It does not use data.frame
> type structures but is a bit more flexible.
>
> Marsh Feldman
>
> On 5/30/10 [May 30, 10] 6:00 AM, r-help-requ...@r-project.org wrote:
>>
>> M
On 26.05.2010 15:28, Michael Friendly wrote:
[Environment: Win XP, R 2.10.1]
I'm trying to install the packages JGR and iWidgets required by the
extracat package to make the interactive plots
in the package work. I've tried various things, but nothing seems to
work. Here is my most recent atte
Is there a performance advantage to doing this, as opposed to growing
the vector within the loop? I suppose R could have to dynamically
reallocate memory at some point?
Alan
2010/5/30 Uwe Ligges :
>
>
> On 26.05.2010 08:52, Alan Lue wrote:
>>
>> Come to think of it, we can't save the output of
Android + rattle:
http://www.r-bloggers.com/data-mining-through-the-android/
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-sta
Hi
I have made a R function 'convolve2' for convolution of two real
valued vectors based on Rs 'convolve' with option type="open" - see
below.
(exp.length and irf.length are variables set in another part of the program)
I wish to implement the function convolve2 in C and use it in a
function used
The Writing R Extensions manual specifically uses convolve as an
example of calling C from R.
On Sun, May 30, 2010 at 2:08 PM, Gunnar Hellmund wrote:
> Hi
>
> I have made a R function 'convolve2' for convolution of two real
> valued vectors based on Rs 'convolve' with option type="open" - see
> b
On 30.05.2010 19:23, Alan Lue wrote:
Is there a performance advantage to doing this, as opposed to growing
the vector within the loop? I suppose R could have to dynamically
reallocate memory at some point?
Right, but that takes time since memory management is always expensive
(and this way
try
t <- subset(r, (r$time == "0h" & r$strain == "ROC"), select= c(time,strain,
gene, deltact))
Do ?"&" to understand the difference between & and && .
ANJAN PURKAYASTHA wrote:
>
> Hi,
> I have a data-frame, r (column names below), that needs subsetting:
> date, time, strain, gene, deltac
Thanks for your reply.
I should have made my question clearer. Yes, I want to estimate standard
errors with the method "ml" rather than "reml". According to your
suggestion, I looked at the source code for "summary.glm". Now I know it's
"summary.glm" rather than "glm" itself estimates the standard
Thanks for the reply, but ...
No, I am not interested in the convolution function defined in the
R-extensions manual.
I want to use a fast fourier transform version implemented in C
returning values to another C function.
So the question is: How do I call the fft supplied by R in C? (just
like it
Thanks for the reply, that answers my question.
I'm actually interested in using the Welch t in a randomization model framework
where the variance heterogeneity is introduced by the treatment effect and is
not present under the null hypothesis of no differential treatment effect. In
other wo
When I ran a Gamma regression in SAS, the algorithm converged. When I ran it
in R, it keeps uncoverged even if I used 1 iterations. What was wrong?
I used the following code in R:
glm(y ~ x1 x2 x3, control=glm.control(maxit=1), data,
family=Gamma(link="log"))
[[alternative HTML ver
RSQLite.extfuns provides SQLite extension functions for use with
RSQLite. The package is a wrapper of extension functions written by
Liam Healy and made available through the SQLite website
(http://www.sqlite.org/contrib).
You can make the extension functions available on a per db connection
basi
The fft in R has the following C call chain
file purpose
src/main/names.c links R function "fft" to do_fft
src/main/fourier.cdo_fft calls fft_factor, fft_work
src/appl/fft.chome of fft_factor, fft_work
If you want to use the fft at a low level, yo
On Sun, May 30, 2010 at 12:16 PM, Sherrie Jin wrote:
> When I ran a Gamma regression in SAS, the algorithm converged. When I ran it
> in R, it keeps uncoverged even if I used 1 iterations. What was wrong?
> I used the following code in R:
> glm(y ~ x1 x2 x3, control=glm.control(maxit=1), d
Hello,
I need to build a "list of lists"
We have 20 groups we are generating MCMC samples for. There are 10
coefficients, and 1 MCMC iterations.
I would like to store each iteration by-group in a list. My problem is
with the first iteration.
Here is a toy example:
Chain <- list()
for (j
Hello Noah,
Does this work for you?
Chain <- vector("list", 1)
for (j in 1:1){
coef <- c(1,2,3,4,5,6,7,8,9,10) #would be actual MCMC samples
Chain[[j]] <- rbind(Chain[[j]], coef)
If it does, this has the additional advantage that it tends to be
faster to initialize the list at siz
That would be great, except I just realized I made a typo when sending
my code.
I'm tracking 20 coefficents for 10 groups. So I need a "top" list of 10
groups. Then each of the 10,000 samples for each of the 20 coefficients.
It should be more like this:
for(j in 1:1){
for(g in groups)
Let initialize Chain:
Chain <- vector('list', 5)
groups <- 1:5
for(j in 1:1){
for(g in groups){
coef <- c(1,2,3,4,5,6,7,8,9,10) #would be actual MCMC samples
Chain[[g]] <- rbind(Chain[[g]], coef)
}
}
On Sun, May 30, 2010 at 6:05 PM, Noah Silverman wrote:
> That would
Having briefly fallen for the notion that the negative.binomial family
in MASS could be used in glmer, I want to use these lists for a sanity
check on my final (?) plans.
I want to use glmer for logistic regression and for poisson regression
on a data set of 10,000 items. There will be two crosse
Sorry I made a mistake in my code, lapply(x, "[", 8:14) works fine
now. Thanks.
On May 30, 10:55 pm, Jorge Ivan Velez
wrote:
> HiKang,
>
> Try either
>
> lapply(x, "[", 8:14) # Erik Iverson's method
>
> or
>
> lapply(x, function(x) x[8:14])
>
> HTH,
> Jorge
>
>
>
>
>
> On Sun, May 30, 2010 at 9
Nice.
Thanks!
-N
On 5/30/10 3:16 PM, jim holtman wrote:
> Let initialize Chain:
>
> Chain <- vector('list', 5)
> groups <- 1:5
> for(j in 1:1){
>
>for(g in groups){
>
>coef <- c(1,2,3,4,5,6,7,8,9,10) #would be actual MCMC samples
>
>Chain[[g]] <- rbind(Chain[[g]], coef)
If you only need a single variable (in this case value), and just
want to refer to it by the "key", there are other options.
value <- rnorm(6)
names(value) <- format(seq(0.5,3,0.5))
value['1.5']
But do watch out for numerical precision in the output of seq() if
your vector of values
Hello R Forum members.
I have installed for my statistician user, apparently without error, both
the concord and geepack packages. The target system is R 2.10.1 on a
64-bit RedHat Enterprise Linux platform.
However when she attempts to invoke a function in geepack, for example...
geeglm((abus
Dear R users,
Please assist me with the following problem. I have a dataset that looks like
the following:
dat<-data.frame(
'id'=rep(c(1,2,3),each=3),
'time'=rep(c(1,2,3),3),
'y'= c(2,2,NA,2,NA,NA,2,5,7)
)
I wish to create a variable for dropout time in dataframe 'dat' such that the
Greigiano Jose Alves writes:
> I am working on an article forecasting, which use the dynamic linear model,
> a model state space. I am wondering all the commands in R, to represent the
> linear dynamic model and Kalman filter.
> I am available for any questions.
There are a few libraries out the
56 matches
Mail list logo