Can I follow-up with what I've learned about my own myopia regarding
sapply()?
First, I appreciate all the feedback. After thinking about it for a
while I realized R designers have often chosen to accommodate
interactive usage, and in that context, sapply() returning different
types makes perfe
Hi Iakub,Do you mind sharing a concrete example of your approach (from R to
your script and back to R)? There is a growing demand to produce R plots for
government reports that ideally wouldn't require the intervention of a
designer to control the typography. While I'm getting a good grip at
produc
Thank you Jeff. I had to go back to excel and format the column from there.
Thank you everyone,
Yolande
On Sun, Feb 2, 2014 at 9:51 PM, Yolande Tra wrote:
> Hi Jim,
>
> I got an error
> > df$Date2<-
> + as.POSIXct(as.character(df$Date1, format = "%m/%d/%Y %H:%M:%S"))
> Error in as.POSIXlt.ch
?sink
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
On Sun, Feb 2, 2014 at 8:09 PM, Dennis Fisher wrote:
> R 3.0.1
> OS X
>
> Colleagues,
>
> I am experimenting with incorporating C code into R. After com
Hi Jim,
I got an error
> df$Date2<-
+ as.POSIXct(as.character(df$Date1, format = "%m/%d/%Y %H:%M:%S"))
Error in as.POSIXlt.character(x, tz, ...) :
character string is not in a standard unambiguous format
On Sun, Feb 2, 2014 at 9:08 PM, Jim Lemon wrote:
> On 02/03/2014 12:53 PM, Yolande T
You really need to read the "Writing R Extensions" document. It warns you
against performing I/O from C code linked to R.
You probably ought to read the Posting Guide, also, since this question is off
topic here
---
Jeff Ne
Please read the Posting Guide, which warns you to (among other things) post in
plain text and provide a reproducible example.
Read ?strptime. Note that you must provide a format that matches the data you
parse with it.
If you have both formats because you are also using Excel, you can fix the
On 02/03/2014 01:08 PM, Jim Lemon wrote:
On 02/03/2014 12:53 PM, Yolande Tra wrote:
Hi,
I have the following issue. The dataframe df has a column (Date1)
supposed
to be a date but read as a factor. There are two types of values in the
same column Date1
Type 1 are datetime like "5/23/2008 0:00:0
On 02/03/2014 12:53 PM, Yolande Tra wrote:
Hi,
I have the following issue. The dataframe df has a column (Date1) supposed
to be a date but read as a factor. There are two types of values in the
same column Date1
Type 1 are datetime like "5/23/2008 0:00:00"
Type 2 have no time like "1/10/13".
W
Hi,
I have the following issue. The dataframe df has a column (Date1) supposed
to be a date but read as a factor. There are two types of values in the
same column Date1
Type 1 are datetime like "5/23/2008 0:00:00"
Type 2 have no time like "1/10/13".
When I apply the following to the date column
R 3.0.1
OS X
Colleagues,
I am experimenting with incorporating C code into R. After compiling the C
code with:
R CMD SHLIB -o FILE.so FILE.c
and executing:
dyn.load(“FILE.so”)
(without any errors), I execute the following R functions in a terminal window:
READSAS
Hi,
as.numeric(iris$Species)
iris1 <- within(iris,Species <-as.numeric(Species))
A.K.
I have a small question for converting the category data to numeric data.
For example, if we use the iris data in r. we have:
str(iris)
'data.frame': 150 obs. of 5 variables:
$ Sepal.Length: num 5.1
Perhaps I misunderstood your question. Jeff Newmiller says that you did
not want multiple y-scales on the same plot, which is how I read what
you wrote. If you just want plots of X vs. time, Y vs. time, etc.
"stacked" one above the other then you perhaps should simple use
par(mfrow(.,.)) or
Hi,
Try:
x <-
c(rep("A",0.1*1),rep("B",0.2*1),rep("C",0.65*1),rep("D",0.05*1))
set.seed(24)
categorical_data <- sample(x,1)
set.seed(49)
p_val <- runif(1,0,1)
combi <- data.frame(V1=categorical_data,V2=p_val)
variables <- unique(combi$V1)
res <- lapply(levels(variables)
On Feb 2, 2014, at 9:52 AM, Katharina May wrote:
> Hi Simon,
>
> thank you for your reply, I really appreciate any help to understand
> the problem here...
> Unluckily the package upgrade didn't help with this issue.
> An example reproducing the error, and a current sessionInfo() Output
> can be
On 02/03/2014 06:09 AM, David Parkhurst wrote:
I've tried to figure out how to do this from what I read, but haven't
been successful. Suppose I have a dataframe with variables Date, X, and
Y (and maybe U, V, and Z) where X, Y, etc. have different units. I'd
like to plot Y vs. Time above X vs. Tim
Dear Duncan,
I discovered something interesting wrt to the licensing and mirroring
of user-contributed material on StackExchange. Please read below.
On Sun, Nov 24, 2013 at 9:00 PM, Duncan Murdoch
wrote:
>> I'm not aware of a discussion on this, but I would say no.
>> Fragmentation is bad. Furt
On Sun, Feb 2, 2014 at 2:09 PM, David Parkhurst wrote:
> I've tried to figure out how to do this from what I read, but haven't been
> successful. Suppose I have a dataframe with variables Date, X, and Y (and
> maybe U, V, and Z) where X, Y, etc. have different units. I'd like to plot
> Y vs. Tim
He did not ask for dual axis graphs, Rolf.
This can be done with lattice graphics and also with ggplot. See, for example,
[1] or [2]. The melt function is a very powerful tool for preparing for this
task.
[1]
http://www.fromthebottomoftheheap.net/2013/10/23/time-series-plots-with-lattice-and-g
Just ***DON'T***!!! Very bad idea; usually wildly misleading.
See, e.g.:
http://www.perceptualedge.com/articles/visual_business_intelligence/dual-scaled_axes.pdf
OTOH if you're going to be bloody-minded and do it anyway, there are
brazillions of hits from a Google search which will tell you h
If I understand you correctly, there are so many ways to do this
(ggplot2, lattice, base graphics with multiple graphs per page via
?layout,...) that I am puzzled as to how you failed to find what you
needed. Exactly what was it that you read that left you unable to do
this? Perhaps some additional
Probably, you are referring to:
d <- as.data.frame(cbind(Stock, Soil, Nitrogen, Respiration))###
with(d,aggregate(cbind(Nitrogenr=Nitrogen,Respirationr=Respiration),by=list(Soilr=Soil,Stockr=Stock),FUN=mean))
I used:
d <- data.frame(Stock, Soil, Nitrogen, Respiration)
with(d,aggregate(cbind(Nitro
I've tried to figure out how to do this from what I read, but haven't
been successful. Suppose I have a dataframe with variables Date, X, and
Y (and maybe U, V, and Z) where X, Y, etc. have different units. I'd
like to plot Y vs. Time above X vs. Time, above one another.
For example, X is th
On Feb 2, 2014, at 8:43 AM, arun wrote:
> Also,
>
>
> with(d,aggregate(cbind(Nitrogenr=Nitrogen,Respirationr=Respiration),by=list(Soilr=Soil,Stockr=Stock),FUN=mean))
>
Did you compare your output to the input?
--
David.
> A.K.
>
> On Sunday, February 2, 2014 7:58 AM, Rui Barradas
> wrot
On Feb 2, 2014, at 12:20 AM, Aziz, Muhammad Fayez wrote:
> Thank you folks. Actually I did lookup all these resources you mentioned but
> couldn't find a word for word meta data. In fact the data set is a bit
> different from what's in the appendix of the paper. Also the meaning of these
> te
Hi Simon,
thank you for your reply, I really appreciate any help to understand
the problem here...
Unluckily the package upgrade didn't help with this issue.
An example reproducing the error, and a current sessionInfo() Output
can be found below.
Many thanks once again,
Katharina
R Code
Also,
with(d,aggregate(cbind(Nitrogenr=Nitrogen,Respirationr=Respiration),by=list(Soilr=Soil,Stockr=Stock),FUN=mean))
A.K.
On Sunday, February 2, 2014 7:58 AM, Rui Barradas wrote:
Hello,
First of all avoid as.data.frame(cbind(...)). cbind() returns a matrix
and since you are mixing numbers
I have generated a L1 penalized Cox model using the penalized package in R. I
used the optL1() function to generate the Breslow object (see below):
fit <- optL1(surv.obj, penalized = ..., etc)
In the reference manual, it says the fit$predictions are the cross-validated
predictions for the left
Not enough information. Have a look at these links for some suggestions on how
to ask a question on R-help.
John Kane
Kingston ON Canada
> -Original Message-
> From: azadbiost...@gmail.com
> Sent: Sat, 1 Feb 2014 18:37:00 -0800
> To: r-help@r-project.org
> Subject: [R] (no subject)
>
Not exactly the order you specified but otherwise I think this works.
library(plyr)
d <- data.frame(Stock, Soil, Nitrogen, Respiration)
ddply(d, .(Soil, Stock), summarize, mean(Nitrogen), mean(Respiration))
John Kane
Kingston ON Canada
> -Original Message-
> From: aguitatie...@hotmail.c
Hello,
First of all avoid as.data.frame(cbind(...)). cbind() returns a matrix
and since you are mixing numbers with characters, all of the matrix
elements become character. Then as.data.frame transforms everything into
factors. The correct way is
d <- data.frame(Stock, Soil, Nitrogen, Respir
This seems like the ideal case for a MWE. If we can't reproduce your error, we
can't help diagnose it!
Steve
---
Steven Wolf
Research Associate
CREATE for STEM Institute
Michigan State University
> On Feb 1, 2014, at 6:44 AM, "Paresys, Lise" wrote:
>
> Dear all,
>
> I am performing a CCA us
Hi all,
I'm trying to compute a mean on my data but I'm struggling with 2
things: 1. getting the right layout and 2. including the missing values
in the outcome.
#Input data:
Stock <- c("A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B")
Soil <- c("Blank", "Blank", "Control", "Control
On Sun, Feb 2, 2014 at 6:46 AM, Rolf Turner wrote:
> On 02/02/14 15:37, mohammad javad Azadchehr wrote:
>> Hi
>> I want R code for bayesian CIF competing risks.
>> best regards
>
> I want wealth, wisdom, good looks, and to play full forward for the
> Sydney Swans.
One out of four isn't bad.
To
Thank you folks. Actually I did lookup all these resources you mentioned but
couldn't find a word for word meta data. In fact the data set is a bit
different from what's in the appendix of the paper. Also the meaning of these
terms seems to be specific to the study than following the dictionary
35 matches
Mail list logo