Hello,
thank you for your reply.
Actually, the whole rows would have to be averaged anyways - my mistake :-)
Besides the first column "name" there is one other string (chr) variable
"Test" in the dataset (the rows I want to average have always the same
Testvariable), the other variables are numer
Dear all,
I have defined my own class "myclass" using S3 class styles.
A myclass objects is just a matrix with some attribute attached.
When I subset my myclass the resulting matrix (or vector) doesn't
have the attributes attached.
I would like to redefine the `[` function for myclass objects (it
Hi
So what do you want to do with the test variable when averaging?
Did you try aggregate function?
What was results?
Please real data (at least structure) and code you used.
Regards
Petr
From: Verena Weinbir [mailto:vwein...@gmail.com]
Sent: Thursday, May 29, 2014 9:48 AM
To: PIKAL Petr
Cc: r-
dear all members
i have some problems in R- code below, is there anyone helps me to correct
it.
many thanks in advance
thanoon
## Ridge MM ##
rm(list=ls())
library(MASS)
library(mvoutlier)
library(robustbase)
library(car)
library(quantreg)
n<-100
r<-0.95
R<
Hello R-help members,
I have a dataset with 2 treatments and want to assess the effect of a
continous covariate on the Hazard ratio between treatment A and B. I want a
smoothed interaction term which I have modelled below with the following
code:
surv.fit <- coxph(my.surv ~ pspline(CONTINU
Hi,
You can try ?merge() or ?join() from library(plyr)
merge(tempr, pr, by="date",all=TRUE)
A.K.
Hi, all!
I have a problem. I have 2 data frame. Each contains column: "date" and one
unique column (temperature and pressure correspondingly). But dates are not a
same. First one since 1st Jan 20
Hi,
I need to merge two data sets but I need them to match two columns, not just
one. For example:
Hi,
If 'dat1` and 'dat2` are the two datasets.
merge(dat1,dat2,by=c("plant.species","insect.species"),all=TRUE)
# plant.species insect.species visit.freq no.grains
#1 p.A i.1
Thanks a lot for your input.
--
View this message in context:
http://r.789695.n4.nabble.com/Plot-regression-results-with-various-predictors-tp4691307p4691416.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailin
Thanks to to Ista Zahn, I was able to find a work around solution. The key
seems to be that string1 needs to be encoded as UTF-8 prior to being passed
to gsub. For whatever reason,
Encoding(string1) <- "UTF-8"
does not change the encoding on my Windows machine. The work around: I
paste an obv
Luca:
Well, start by using the correct syntax -- you've misplaced your quotes.
Then look at existing code, e.g.
base:::"[.factor"
A little effort on your part obviates the need to post here.
Cheers,
Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information
I believe that what is happening is that you never run fun1, so no
environment for fun1 is ever created and therefore x1 is never defined
with its own environment. You grab the statement y <- x1 from the
body of fun1, but then tries to evaluate it in the current environment
(where it cannot find x
Hello,
I would like to extract the value in row 1 corresponding to the maximum in
row 2
Array W
[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[,8] [,9][,10]
[1,] 651.0 651.0 651.0 651.0 651.0 651.0 651.0
119.0 78.0 78.0
On 5/29/2014 7:40 AM, Greg Snow wrote:
I believe that what is happening is that you never run fun1, so no
environment for fun1 is ever created and therefore x1 is never defined
with its own environment. You grab the statement y <- x1 from the
body of fun1, but then tries to evaluate it in the cu
On May 29, 2014, at 11:02 AM, Olivier Charansonney
wrote:
> Hello,
>
> I would like to extract the value in row 1 corresponding to the maximum in
> row 2
>
>
>
> Array W
>
> [,1] [,2] [,3] [,4] [,5] [,6] [,7]
> [,8] [,9][,10]
>
> [1,] 651.000
On May 29, 2014, at 11:22 AM, Marc Schwartz wrote:
>
> On May 29, 2014, at 11:02 AM, Olivier Charansonney
> wrote:
>
>> Hello,
>>
>> I would like to extract the value in row 1 corresponding to the maximum in
>> row 2
>>
>>
>>
>> Array W
>>
>> [,1] [,2] [,3] [,4]
This is a warning and in your case would not be a problem, but it is
good to think about and the reason why it is suggested that you avoid
using attach and be very careful when you do use attach. What is
happening is that you first created a vector named 'x' in your global
workspace, you then crea
You should probably read the posting guide, there is a link at the
bottom of every e-mail on the list.
You provide a large amount of code but no description of what you are
trying to do with it and very little about what problem you are
having. Most people (well me at least) are unwilling to run
When I run the code below, I receive the following error message. Thanks in
advance for help with fixing this error message.
saveSWF({
}, img.name = "file",swf.name = "file2.swf" , single.opts = "'utf8':
false", autoplay = FALSE ,
interval = 0.1, imgdir = "directory", htmlfile = "random.html
Yes, this is the good one Arun! Thank you very much.
I tried each solution but yours was the best. It works well.
Thanks anyway for all your replies!
--
View this message in context:
http://r.789695.n4.nabble.com/remove-duplicated-row-according-to-NA-condition-tp4691362p4691422.html
Sent fr
Hello,
Iam using R 3.1 and i tried to run this script:
setwd("C:/users/marta/desktop/DB")
library(chron)
library(xlsx)
filename<-"univerest_50.csv"
filename<-"monicap_50.csv"
filename<-"univer1_50.csv"
filename<-"univer2_50.csv"
DBxy<-read.csv(paste("C:/users/marta/desktop/DB",filename
There's a comma missing after sep="").
DBxy<-read.csv(paste("C:/users/marta/desktop/DB",filename, sep="")
sep=",",header=TRUE) should be
DBxy<-read.csv(paste("C:/users/marta/desktop/DB",filename, sep=""),
sep=",",header=TRUE)
^
This is not a big problem. It just means your system does not have a
default program to open .swf files. If you associate, say, a movie
player, with .swf, this problem will go away.
Regards,
Yihui
--
Yihui Xie
Web: http://yihui.name
On Thu, May 29, 2014 at 6:04 AM, Cheryl Johnson
wrote:
> When
Good afternoon.
The question is: does R support pointer like structures? The specific
problem is:
a function supporting operations on a set of data frames with similar
structures.
I have a set of data frames with similar structures. I wish to perform
similar operations on those data frames. I
I want to perform a multiple regression in R and make predictions based on
the trained model. Below is an example code I am using:
price = c(10,18,18,11,17)
predictors = cbind(c(5,6,3,4,5),c(2,1,8,5,6))
predict(lm(price ~ predictors), data.frame(predictors=matrix(c(3,5),nrow=1)))
So, based on th
On May 29, 2014, at 1:13 PM, dansawyer wrote:
> Good afternoon.
>
> The question is: does R support pointer like structures? The specific
> problem is:
>
> a function supporting operations on a set of data frames with similar
> structures.
>
> I have a set of data frames with similar structu
Solved! Here is the solution in case it helps others:
The easiest way to get past the issue of matching up variable names from a
matrix of covariates to newdata data.frame column names is to put your
input data into a data.frame as well. Try this
price = c(10,18,18,11,17)
predictors = cbind(c(5,6
Hi,
I'd do it like this, making use of data frames and the data argument to lm.
traindata <- data.frame(price=price, predictor1=predictor1,
predictor2=predictor2)
testdata <- data.frame(predictor1=3, predictor2=5)
predict(lm(price ~ ., data=traindata), testdata)
Note that you don't have to speci
10Hi Thomas,
On Thu, May 29, 2014 at 9:15 AM, Thomas Stewart
wrote:
> Thanks to to Ista Zahn, I was able to find a work around solution. The key
> seems to be that string1 needs to be encoded as UTF-8 prior to being passed
> to gsub. For whatever reason,
>
> Encoding(string1) <- "UTF-8"
>
> doe
Yes and no. There are "lists" that can hold anything, but for normal objects
there are no "pass by reference" semantics. The exception to that is
environments, but that is really a limited scope of usability. That is, you can
receive a changed object in the calling scope and choose to overwrite
On Thu, 29 May 2014 01:13:10 PM dansawyer wrote:
> Good afternoon.
>
> The question is: does R support pointer like structures? The specific
> problem is:
>
> a function supporting operations on a set of data frames with similar
> structures.
>
> I have a set of data frames with similar structur
On May 29, 2014, at 2:54 PM, Dan Sawyer wrote:
> Thanks for the follow up.
>
> I will look into changing the column reverences.
Please look into reading the Posting Guide. You are asked NOT to respond
privately but rather to the list.
As teh footer of every message says: PLEASE do read the po
Dear R People:
How are you?
I would like to look at the underlying C code from the program C_ARIMA_Like
in the stats package.
However, since that is a base package, I'm not entirely sure how to access
this.
When I used the .C(C_ARIMA_Like)
it says that the C_ARIMA_Like cannot be found.
Th
On May 29, 2014, at 7:12 PM, Erin Hodgess wrote:
> Dear R People:
>
> How are you?
>
> I would like to look at the underlying C code from the program C_ARIMA_Like
> in the stats package.
>
> However, since that is a base package, I'm not entirely sure how to access
> this.
>
> When I used th
Perfect!
Thanks so much for your help!
Erin
On Thu, May 29, 2014 at 8:52 PM, Marc Schwartz wrote:
>
> On May 29, 2014, at 7:12 PM, Erin Hodgess wrote:
>
> > Dear R People:
> >
> > How are you?
> >
> > I would like to look at the underlying C code from the program
> C_ARIMA_Like
> > in the sta
You need to download the R source code to view source code of compiled
functions, whether they are C or Fortran or any other compiled language. Are
you familiar with compiled languages?
---
Jeff Newmiller
Thanks Greg for your response. Is there a work around?
Of course this begs the question as to Why is attach part of the sample session
in App. A of the introductory manual? All the commands are directly from App.
A. Is it possible the configuration of R on my computer is not in accord with
acce
36 matches
Mail list logo