On 9/26/2016 2:56 PM, Christofer Bogaso wrote:
Hi again,
I have been following above suggestion to export data from R to xlsx
file using XLconnect. However recently I am facing Java memory
allocation problem with large dataset (looks like a known issue with
this package) and therefore decided to
I received an error message while trying to use family=scat in the GAM
package. The models were working fine yesterday.
The problem is not with my data seeing as the gaussian distribution is
working fine.
mod=gam(RT~s(a) + s(b), data=dat, family=gaussian)
mod=gam(RT~s(a) + s(b), data=dat, family=s
openxlsx is not solving my problem either. It is corrupting my xlsx file.
I have a large data.frame, which I want to export to an existing xlsx
file, without formatting that existing file. With XLconnect there is
an option "setStyleAction(wb,XLC$"STYLE_ACTION.NONE")" which does it
so. I am looking
I am trying to create a grouped barplot that uses marginal (row) proportions
rather than cell proportions and can't figure out how to change:
y = (..count..)/sum(..count..)
in ggplot to do this.
Using the mtcars dataset as an example and considering two categorical
variables (cyl and am - purel
You failed to read the Posting Guide, which would have told you which mailing
list to post this question to. (Hint: not this one.)
--
Sent from my phone. Please excuse my brevity.
On September 26, 2016 4:46:06 AM PDT, Eric Deveaud wrote:
>
>
> Hello,
>
>as far as I understood the R librar
I use the "openxlsx" package to handle spreadsheets.
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 Mon, Sep 26, 2016 at 5:56 PM, Christofer Bogaso <
bogaso.christo...@gmail.com> wrote:
> Hi again,
>
> I
Hi again,
I have been following above suggestion to export data from R to xlsx
file using XLconnect. However recently I am facing Java memory
allocation problem with large dataset (looks like a known issue with
this package) and therefore decided to move to using "xlsx" package.
Now I started fac
... and just for fun, here's an alternative in which mapply() is used
to vectorize switch(); again, whether you like it may be just a matter
of taste, although I suspect it might be less efficient than ifelse(),
which is already vectorized:
DT <- within(DT,
exposure <- {
Ista:
Aha -- now I see the point. My bad. You are right. I was careless.
However, cut() with ifelse() might simplify the code a bit and/or make
it more readable. To be clear, this is just a matter of taste; e.g.
using your data and a data frame instead of a data table:
> DT <- within(DT,
On 26/09/2016 6:29 AM, Mike meyer wrote:
Hello,
I have both 32 and 64 bit verions of R installed. What happens if I open a workspace saved from 64 bit R
in the 32 bit version or conversely?
I am fairly careless but never noticed any problems.
No problems will arise because of the different
On Mon, Sep 26, 2016 at 2:48 PM, Bert Gunter wrote:
> I thought that that was a typo from the OP, as it disagrees with his
> example. But the labels are arbitrary, so in fact cut() will do it
> whichever way he meant.
I don't see how cut will do it, at least not conveniently. Consider
this slight
I think you are going to have to be more specific than "having some trouble".
Your plot used lka as the x-axis.
FWIW note that
lm(ruotsi.pist ~ mies + koulu + clka + koulu*clka, data=dta)
is the same as
lm(ruotsi.pist ~ mies + koulu*clka, data=dta)
--
Sent from my phone. Please excuse my brev
If your goal is to visualize the predicted curve from an lm fit (or
other model fit) then you may want to look at the Predict.Plot and
TkPredict functions from the TeachingDemos package.
On Sun, Sep 25, 2016 at 7:01 AM, Matti Viljamaa wrote:
> I’m trying to plot regression lines using curve()
I thought that that was a typo from the OP, as it disagrees with his
example. But the labels are arbitrary, so in fact cut() will do it
whichever way he meant.
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Ber
On Mon, Sep 26, 2016 at 1:59 PM, Bert Gunter wrote:
> This seems like a job for cut() .
I thought that at first two, but the middle group shouldn't be .87 but rather
exposure" = "2007-01-01" - "fini"
so, I think cut alone won't do it.
Best,
Ista
>
> (I made DT a data frame to avoid loading the
This seems like a job for cut() .
(I made DT a data frame to avoid loading the data table package. But I
assume it would work with a data table too, Check this, though!)
> DT <- within(DT, exposure <-
> cut(fini,as.Date(c("2000-01-01","2006-01-01","2006-06-30","2006-12-21")),
> labels= c(1,.87,
Hi Frank,
lapply(DT) iterates over each column. That doesn't seem to be what you want.
There are probably better ways, but here is one approach.
DT[, exposure := vector(mode = "numeric", length = .N)]
DT[fini < as.Date("2006-01-01"), exposure := 1]
DT[fini >= as.Date("2006-01-01") & fini <= as.D
> On 26 Sep 2016, at 19:41, Matti Viljamaa wrote:
>
> Thank you.
>
> However, I’m having some trouble converting your code to use clka, because
> the model I was using was:
>
> fit2 <- lm(ruotsi.pist ~ mies + koulu + clka + koulu*clka, data=dta)
I mean, not to use clka to replace lka. But to
Thank you.
However, I’m having some trouble converting your code to use clka, because the
model I was using was:
fit2 <- lm(ruotsi.pist ~ mies + koulu + clka + koulu*clka, data=dta)
> On 25 Sep 2016, at 21:23, Jeff Newmiller wrote:
>
> This illustrates why you need to post a reproducible exa
Hi R-Users,
I am running raster to point code in R, but I have an error message that
"cannot allocate vector of size 1.7 Gb". One of my friends run the same
code I used, and it is working with his computer. I am using Window 7
64-bit with 16 GB ram. When I check memory size and limit in RStudio, I
The package "Rdice" has just been released on CRAN. It contains a
collection of functions to simulate dice rolls and the like. In particular,
experiments and exercises can be performed looking at combinations and
permutations of values in dice rolls and coin flips, together with the
corresponding f
Hello,
as far as I understood the R library generic compilation mechanism,
compilation of C//C++ sources is controlde
1) at system level by the ocntentos RHOME/etc/Makeconf
2) at user level by the content of ~/.R/Makevars
3) at package level by the content of src/Makevars
Problem I
Hello,
I have both 32 and 64 bit verions of R installed. What happens if I open a
workspace saved from 64 bit R
in the 32 bit version or conversely?
I am fairly careless but never noticed any problems.
__
R-help@r-project.org mailing list -- To UN
Dear all,
I have a R data table like this:
DT <- data.table(
id = rep(c(2, 5, 7), c(3, 2, 2)),
fini = rep(as.Date(c('2005-04-20', '2006-02-19', '2006-10-08')), c(3, 2, 2)),
group = rep(c("A", "B", "A"), c(3, 2, 2)) )
I want to construct a new variable "exposure" defined as follows:
1) I
24 matches
Mail list logo