See below.
On Wed, 13 Aug 2014, Neotropical bat risk assessments wrote:
Hi all,
Thanks go out to those who provided helpful suggestions last year with a
similar issue.
I am working with a new data set and trying what I assumed was a simple
aggregation in reshape2 but is not working. I hav
RSiteSearch("tobit")
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Res
On Aug 12, 2014, at 8:40 AM, Bert Gunter wrote:
> PI's of what? -- future individual values or mean values?
>
> I assume quantreg provides quantiles for the latter, not the former.
> (See ?predict.lm for a terse explanation of the difference).
I probably should have questioned the poster about
Previously you asked
> A second question: is this the best way to make a list
>of data frames without having to manually type c(dataframe1, dataframe2,
> ...) ?
If you use 'c' there you will not get a list of data.frames - you will
get a list of all the columns in the data.frame you supp
Hi Richard,
Thank you very much for your reply and your code.
Your code is doing just what I asked for, but does not seem to be what I
need.
I will need to review some basic R before I can continue.
I am trying to list data frames in order to bind them into 1 single data
frame with somet
Hear, hear. Getting the questioner to slow down and look at what they really
want is key, because if they don't know what they want then their question will
be unclear, and I hate answering a question that was never really what the OP
was looking for in the first place.
One problem I have encou
Another solution is to use table to generate your x matrix, instead of
trying to make one and adding to it. If you want the table to have
the same dimnames on both sides, make factors out of the columns of x1
with the same factor levels in both. E.g., using a *small* example:
> X1 <- data.frame(
I may have missed something, but I didn't see the result you want for
your example. Also,
none of the entries in the x1 you showed are row or column names in x,
making it hard to show what you want to happen.
Here is a function that gives you the choice of
*error: stop if any row of x1 is 'ba
Hi John,
People do sometimes link to external data and code, though I'm not
sure I've seen any in that particular format.
But, two things to consider.
A. I'm lazy. If the problem is fully-formed in the email, I'm more
likely to try to solve it than if I have to go download something and
figure o
This is just a thought that has occurred to me. I don't know if it is
an "Oh, WOW!" or an "Are you KIDDING?!?" type thought. So I thought
I'd ask here.
I use github for a few things. Nothing great, but maybe nice. Anyway,
one feature of GitHub is the GIST feature. What I am used to github
being fo
Hello again. sorry for question again.
may be I was not clear in asking before.
I don't want to remove rows from matrix, since row names and column
names are identical in matrix.
I tried your suggestion and here is what I get:
> fx <- function(x,x1){
+ i <- as.matrix(x1[,c("V1","V2")])
+ x[i]
Generally if you want to save the results of a loop then it is time to
learn to use the lapply and sapply functions instead.
Try something like:
Tukey <- lapply( 6:n, function(i) Tukey1 = HSD.test(lm(sdata_mg[,i] ~
sdata_mg$Medium+sdata_mg$color+sdata_mg$type+sdata_mg$Micro),
'sdata_mg$Micro') )
Hi, i'm new to R. I have a question about how to save results in a loop to
a file. Here is an example:
for (i in 6:n){
Tukey1 = HSD.test(lm(sdata_mg[,n] ~
sdata_mg$Medium+sdata_mg$color+sdata_mg$type+sdata_mg$Micro),
'sdata_mg$Micro')
}
I don't know how to do it with the loop for all data, so i
Jim, Wow that was cl ! This function is *really* useful. Thank
you very much ! (It is also way beyond my capability).
I need to make a list of data frames because then I am going to bind
them with plyr using 'dplyr::rbind_all(listOfDataFrames)'. This will
make a single data frame, and f
I would do something like this
lsDataFrame <- function(xx=ls()) xx[sapply(xx, function(x)
is.data.frame(get(x)))]
ls("package:datasets")
lsDataFrame(ls("package:datasets"))
On Wed, Aug 13, 2014 at 2:56 PM, Matthew
wrote:
> Hi everyone,
>
>I would like the find which objects are data frames i
Here is a function that I use that might give you the results you want:
=
> my.ls()
Size Class Length Dim
.Random.seed 2,544integer 626
.remapHeaderFile 40,440 data.frame 2 373 x 2
colID 216 char
Hi everyone,
I would like the find which objects are data frames in all the
objects I have created ( in other words in what you get when you type:
ls() ), then I would like to make a list of these data frames.
Explained in other words; after typing ls(), you get the names of
objects. Whi
On 12-Aug-2014 22:22:13 Ted Harding wrote:
> On 12-Aug-2014 21:41:52 Rolf Turner wrote:
>> On 13/08/14 07:57, Ron Michael wrote:
>>> Hi,
>>>
>>> I would need to get a clarification on a quite fundamental statistics
>>> property, hope expeRts here would not mind if I post that here.
>>>
>>> I leant
You can replace the loop
> for (i in nrow(x1)) {
>x[x1$V1[i], x1$V2[i]] <- 1;
> }
by
f <- function(x, x1) {
i <- as.matrix(x1[, c("V1","V2")]) # 2-column matrix to use as a subscript
x[ i ] <- 1
x
}
f(x, x1)
You will get an error if not all the strings in the subscript matrix
are in the
Use [[ instead of $. E.g.,
f <- function(columnName) {
d <- data.frame(x=1, y=2, z=3)
d[[columnName]]
}
f("z") # 3
cName <- "y"
f(cName) # 2
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Aug 13, 2014 at 4:33 AM, madhvi.gupta wrote:
> Hi,
> Can anyone please tell me how to use
I don't believe I understand your question, but here it goes.
dat <- data.frame(x = rnorm(100), y = runif(100))
mean(dat$x)
Hope this helps,
Rui Barradas
Em 13-08-2014 12:33, madhvi.gupta escreveu:
Hi,
Can anyone please tell me how to use a argument of a function after $
sign of a data frame
Hi.
Thank you for your help.
yes, thats exactly right - but the 1211x1211 matrix has some
row/column elements that may not be present in x1.
Is that the reason I get this error?
My matrix row names and column names are identical. I changed the
order in my dput code for representational purpose so
Hi,
Can anyone please tell me how to use a argument of a function after $
sign of a data frame.That argument is one of the column name of the data
frame.
Thanks,
Madhvi
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-hel
To follow up on David's suggestion on this thread, I might add that the
demo(predemo)
in my quantreg package illustrates a variety of approaches to prediction
intervals for
quantile regression estimates. Adapting this to monotone nonparametric
estimation
using rqss() or cobs would be quite st
Thanks to all of you for your suggestions and comments. I really
appreciate it.
Some comments to Dennis' comments:
1) I am not concerned about predicting outside the original range. That
would be nonsense anyway considering the physical phenomenon I am
modeling. I am, however, concerned that t
On 08/13/2014 08:38 AM, John Pura wrote:
Thank you for the reply. However, I think I may not have clarified what my
cases are. I'm studying the effect of radiation treatment (vs. none) on
survival. My cases are patients who received radiation and controls are those
who did not. I used a prop
Ok, I will try to do a short tutorial answer.
1. The score statistic for a Cox model is a sum of (x - xbar), where "x" is the covariate
vector of the subject who had an event, and xbar is the mean covariate vector for the
population, at that event time.
- the usual Cox model uses the mean of
Data
this is the data I used for the following problems:
dput(sdf)
structure(list(weeks = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
29, 30), values = c(9.45, 7.99, 9.29, 11.66, 12.16, 10.18, 8.04,
11.46, 9.2, 10.34, 9.03, 11.47, 10.
On Tue, Aug 12, 2014 at 7:14 PM, Adrian Johnson
wrote:
> Hi:
> sorry I have a basic question.
>
> I have a data frame with two columns:
> > x1
> V1 V2
> 1 AKT3TCL1A
> 2 AKTIPVPS41
> 3 AKTIPPDPK1
> 4 AKTIP GTF3C1
> 5 AKTIPHOOK2
> 6 AKTIPPOLA2
> 7 AKTIP KIA
On 08/13/2014 05:00 AM, John Purda wrote:
I am curious about this problem as well. How do you go about creating the
weights for each pair, and are you suggesting that we can just incorporate a
weight statement in the model as opposed to the strata statement? And Dr.
Therneau, let's say I hav
Hi all,
Thanks go out to those who provided helpful suggestions last year with a
similar issue.
I am working with a new data set and trying what I assumed was a simple
aggregation in reshape2 but is not working. I have a large number of
similar data sets to run so getting the code correct i
31 matches
Mail list logo