Dear R experts,
I got help to build a loop but there is a bug inside it that causes
one part of the mechanism to fail.
It should grow once, but if keep growing on rows where $ti_all is not NA.
Here is a wall of code that very crudely demonstrates the problem,
there is a couple of dim() outputs a
row.names=FALSE))
out <- paste0(c(l1, l2, ""), collapse="\n")
## Reattach attributes
att <- list("`Content-Type`" = structure(c("text/html", "utf-8"),
.Names = c("", "charset")))
attrib
Content-Type`" = structure(c("text/html", "utf-8"), .Names = c("",
>> "charset")))
>> x <- read.csv(textConnection(RAW.API), as.is = TRUE)
>> x
> id event_arm namedob pushed_text pushed_calc complete
> 1 1 event_1
Dear R experts,
I'm reading data from an online database via API and it gets delivered in this
messy comma separated structure,
> RAW.API <-
> structure("id,event_arm,name,dob,pushed_text,pushed_calc,complete\n\"01\",\"event_1_arm_1\",\"John\",\"1979-05-01\",\"\",\"\",2\n\"01\",\"event_2_arm_1\
be the most elegant solution, but it works.
Best,
Eric
On Thu, Mar 29, 2012 at 4:07 AM, Jim Holtman wrote:
>
> ?setdiff
>
> Sent from my iPad
>
> On Mar 29, 2012, at 4:28, "Eric Fail" wrote:
>
> > Dear R experts,
> >
> > I've realized that it mig
Dear R experts,
I've realized that it might not be possible to define a negative SELCET
statement in a SQL call so now I'm looking for the smoothest way to generate a
list of what I would like from my large database by first pulling all the names
with a query like this "SELECT top 1 * FROM your
Thank you Bart for your idea, the thing is that I have a large number of
tables and I would like to avoid having to pull them at all.
I currently have a list that I use as a lookup table in a loop with an if
else statement to sort between tables I want to sqlFetch (take everything)
and tables wher
Dear R-list,
I'm queering a M$ Access database with the sqlQuery function from the RODBC
library. As I cannot make a working example with a database here is an
illustrative example,
library(RODBC)
mdbConnect<-odbcConnectAccess("S:/data/ ... /databse.mdb")
data <- sqlQuery(mdbConnect, "select id
Dear R-list,
I am trying to visualize where the dropout happens in our patient flow. We are
currently using traditional flowcharts and it bothers me that I can't visualize
both the percentage and the flow in one diagram.
The other day I came across some interesting diagrams doing exactly what I
correction, this is the working R script, forgot '1: ... )',
dfn = list();
for (i in 1:length(stringTables)) {
dfn[[i]] <- sqlFetch(mdbConnect, stringTables[[i]])
}
On Fri, Feb 24, 2012 at 4:48 PM, Eric Fail wrote:
> Problem solved thanks to Peter Langfelder's response to
>i<http://piratepad.net/i>
]])
}
Thanks,
Eric
On Fri, Feb 24, 2012 at 3:19 PM, Eric Fail wrote:
> Dear R-list,
>
> I am trying to import (all) frames from a Microsoft Access database as
> individual data frames in a fancy loop, but I'm having troubles figuring
> out
Dear R-list,
I am trying to import (all) frames from a Microsoft Access database as
individual data frames in a fancy loop, but I'm having troubles figuring out
how to use the 'sqlFetch' from the RODBS package in a loop (mostly because I
can't figure out how to loop over elements (I came from s
Thank you for solving my problem, it worked out beautifully.
This was exactly what I was looking for, the ggplot2 package keeps
impressing me.
Thanks,
Eric
On Wed, Dec 7, 2011 at 6:01 AM, Hadley Wickham wrote:
> On Wed, Dec 7, 2011 at 4:02 AM, Eric Fail wrote:
>> Dear list,
>>
Dear list,
I have been struggling with this for some time now, and for the last hour I
have been struggling to make a working example for the list. I hope someone out
there have some experience with plotting longitudinal data that they will share.
My data is some patient data with three differ
N: Basics: ##.#. ##.#. Live Go...
> Live: OO#.. Dead: OO#.. Playing
> Research Engineer (Solar/Batteries O.O#. #.O#. with
> /Software/Embedded Controllers) .OO#. .OO#. rocks...1k
> ---
> Sent from my phone
Dear R-list,
Here is my simple question,
I have n data frames that I would like to merge, but I can't figure
out how to add information about the origin of the variable(s).
Here is my problem,
DF.wave.1 <- data.frame(id=1:10,var.A=sample(letters[1:4],10,TRUE))
DF.wave.2 <- data.frame(id=1:10,va
s4 <- gsub("_", ",", s3)
s5 <- read.table(textConnection(s4[1]), sep = ",")
DF <- read.table(textConnection(s4), skip = 1, sep = ",", as.is = TRUE)
DF$block <- head(cumsum(c("", DF$V8) == "BLOCK")+1, -1)
DF$run <- ave(DF$bloc
Dear R-list,
I have a partly comma separated partly underscore separated string that I am
trying to parse into R.
Furthermore I have a bunch of them, and they are quite long. I have now spent
most of my Sunday trying to figure this out and thought I would try the list to
see if someone here wo
me know if not. The example I sent
> earlier was just for simplicity.
> Scott
>
> On Saturday, February 19, 2011 at 4:58 PM, Eric Fail wrote:
>
> Hi Scott,
>
> Thank you for taking the time to look at my problem!
>
> I played around with your example and realized that i
>
> ggplot(diamonds_df, aes(x = cut, y = mean_price)) +
>
> geom_point() +
>
> geom_errorbar(limits, width=0.2)
>
> Sincerely,
>
> Scott Chamberlain
>
> Rice University, EEB Dept.
>
> On Saturday, February 19, 2011 at 3:12 PM, Eric Fail wrote:
>
> Can'
Can't anybody give me a hint on how to solve this? I even bought the
ggplot2-book, so you could also give a page (or a series of pages).
Thanks,
Eric
On Thu, Feb 17, 2011 at 10:19 AM, Eric Fail wrote:
>
> Dear R-list
>
> I'm working with with geom_errorbar; spec
Dear R-list
I'm working with with geom_errorbar; specifically I'm trying to
reproduce the example Hadley Wickham have on
http://had.co.nz/ggplot2/geom_errorbar.html (all in the button of the
page) where he makes an nice plot with errorbars and then draw lines
between the points.
What confuses me
Hi Ruser
As so usual I'm trying to replicate some SAS code. I wold like to know
if there is a wildcard operators, as " : " in SAS, in R?
When running:
lm(y ~ x1 + x2 + x3 + x4 + x5 + x6 x9860, data=mydata)
I would like to be able to get around it by just writing something
like this:
Dear R-list
I'm on my way to start a new project on a rather big panel, consisting
of approximately 8 million observations in 30 waves of data and about
15 variables. I have a similar data set that is approximately 7
gigabytes in size.
Until now I have done my data management in SAS, and
scale_x_continuous(breaks = NA)
> plot + geom_line() +
> geom_smooth(aes(group = male, colour = male), size = 1.2,
> se = FALSE) +
> scale_x_continuous(breaks = c(10, 12, 13, 15)) +
> scale_colour_hue("gender")
>
> The last line changes
Dear list
A week ago Dennis Murphy helped me out by showing me some nice ggplot2
tricks . Now I got stuck in a new problem that I can't solve (I have
ordered the ggplot2-book).
My problem is that I can't add my spline (or geom_smooth) and at the
same time control the grid (using scale_x_c
ndividual spaghetti plots, and by default, a confidence envelope
> around it. To get rid
> of the envelope, include se = FALSE as an argument to geom_smooth();
> to change the
> color, add the argument colour = 'red', for example.
>
> HTH,
> Dennis
>
> On Mon, Jan
Hi Ruser
I'm trying to replicate some SAS code. I have to add a spline to my
longitudinal spaghetti plot.
I have the plot, but I can't add the spline, a overall trend line. In
the SAS code they use the command 'I=SM50S' and I would prefer
something similar. I’m using R 2.10.1 on windows
Dear list users
How is it possible to visualise both a linear trend line and a quadratic trend
line on a plot
of two variables?
Here my almost working exsample.
data(Duncan)
attach(Duncan)
plot(prestige ~ income)
abline(lm(prestige ~ income), col=2, lwd=2)
Now I would like to add
29 matches
Mail list logo