OO#.. Playing
> Research Engineer (Solar/BatteriesO.O#. #.O#. with
> /Software/Embedded Controllers) .OO#. .OO#. rocks...1k
> -------
> Sent from my phone. Please excuse my brevity.
>
>
unctions. This can all be done once you understand the structure of
> the data. So some examples would be useful if you want someone to
> propose a solution.
>
> On Tue, Jun 19, 2012 at 11:54 AM, Ben quant wrote:
> > Hello,
> >
> > Has a function been built that will
Hello,
Has a function been built that will skip to a certain bit in a binary file?
As of 2009 the answer was 'no':
http://r.789695.n4.nabble.com/read-binary-file-seek-td900847.html
https://stat.ethz.ch/pipermail/r-help/2009-May/199819.html
If you feel I don't need to (like in the links above), p
t;A","B","C","D")
> rep_vec <- rep(sapply(split(vec, cumsum(rep(c(1, 0, 0), 5))), paste,
> collapse=""), 4)
> mat <- matrix(rep_vec, nrow=5, byrow=TRUE, dimnames=list(NULL,nms))
> mat
>
>
> Hope this helps,
>
> Rui Barrada
Hello,
What is the fastest way to do this? I has to be done quite a few times.
Basically I have sets of 3 numbers (as characters) and sets of 3 dashes and
I have to store them in named columns. The order of the sets and the column
name they fall under is important. The actual numbers and the patte
are doing
>
> is a very hard way to do things (and this particular conversion doesn't***
> *
>
> make much sense).
>
> ** **
>
> Bill Dunlap****
>
> Spotfire, TIBCO Software
>
> wdunlap tibco.com
>
> ** **
>
> *From:* Ben quan
bco.com
>
>
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf
> > Of Ben quant
> > Sent: Friday, June 08, 2012 11:00 AM
> > To: Duncan Murdoch
> > Cc: r-help@r-project.org
> > S
t gets me where I want to go.
Thanks,
Ben
On Fri, Jun 8, 2012 at 11:56 AM, Duncan Murdoch wrote:
> On 08/06/2012 1:50 PM, Peter Langfelder wrote:
>
>> On Fri, Jun 8, 2012 at 10:25 AM, David
>> Winsemius>
>> wrote:
>> >
>> > On Jun 8, 2012, at 1:11
Hello,
How do I change this:
> cnt_str
[1] "\002" "\001" "\102"
...to this:
> cnt_str
[1] "2" "1" "102"
Having trouble because of this:
> nchar(cnt_str[1])
[1] 1
Thanks!
Ben
[[alternative HTML version deleted]]
__
R-help@r-project.org maili
;
> z = Intervals(c(1,10))
> y = Intervals(c(5,10))
> x = Intervals(c(4,6))
>
> do.call("interval_intersection", list(x,y,z))
>
> Michael
>
> On Tue, May 15, 2012 at 12:46 PM, Ben quant wrote:
> > Hello,
> >
> > Thanks in advance for any help
me.
ben
On Tue, May 15, 2012 at 10:53 AM, Steve Lianoglou <
mailinglist.honey...@gmail.com> wrote:
> Hi,
>
> On Tue, May 15, 2012 at 12:46 PM, Ben quant wrote:
> > Hello,
> >
> > Thanks in advance for any help!
> >
> > How do I pass an unknown number
Hello,
Thanks in advance for any help!
How do I pass an unknown number of objects into the "..." (dot dot dot)
parameter? Put another way, is there some standard way to pass multiple
objects into "..." to "fool" the function into thinking the objects are
passed in separately/explicitly with commo
l.com> wrote:
> Hi all,
>
> Nice code samples presented all around.
>
> Just wanted to point out that I think the stuff found in the
> `intervals` package might also be helpful:
>
> http://cran.at.r-project.org/web/packages/intervals/index.html
>
> HTH,
> -
functions and data structures for this
> than
> to adapt the cumsum/order idiom to different situations.
>
> Bill Dunlap
> Spotfire, TIBCO Software
> wdunlap tibco.com
>
>
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-boun
11
> [2,] -25.5012
> [3,]0.7713
> [4,] 10.00 -12
> [5,] 25.0013
> [6,] 30.00 -12
> [7,] 35.00 -11
> [8,] 70.00 12
> [9,] 80.30 -11
> [10,] 90.0012
> [11,] 95.00 -11
>
,2] [,3]
> [1,] -100.0011
> [2,] -25.5012
> [3,]0.7713
> [4,] 10.00 -12
> [5,] 25.0013
> [6,] 30.00 -12
> [7,] 35.00 -11
> [8,] 70.0012
> [9,] 80.30 -11
> [10,] 90.00 1
angesList <- list(x=x, ...)
>labels <- vapply(as.list(substitute(list(x, ...)))[-1],
> function(x)deparse(x)[1], "")
>oldmar <- par(mar = replace(par("mar"), 2, max(nchar(labels)/2, 10)))
>on.exit(par(oldmar))
>xlim <- do.call("range
Hello,
I'm posting this again (with some small edits). I didn't get any replies
last time...hoping for some this time. :)
Currently I'm only coming up with brute force solutions to this issue
(loops). I'm wondering if anyone has a better way to do this. Thank you for
your help in advance!
The pr
ks!
Ben
On Fri, May 11, 2012 at 8:58 AM, Ben quant wrote:
> Hello,
>
> Currently I'm only coming up with brute force solutions to this issue.
> Wondering if anyone knows of a better way to do this.
>
> The problem: I have endpoints of one x range (x_rng) and an unknown number
Hello,
Currently I'm only coming up with brute force solutions to this issue.
Wondering if anyone knows of a better way to do this.
The problem: I have endpoints of one x range (x_rng) and an unknown number
of s ranges (s[#]_rng) also defined by endpoints. What I want are the parts
of the x range
Solution: have package mgcv loaded when you predict...not just for the fit.
:) Silly mistake...
Thanks Simon!
Ben
On Thu, May 3, 2012 at 3:56 PM, Ben quant wrote:
> Hello,
>
> I don't understand what went wrong or how to fix this. How do I set
> qr=TRUE for gam?
>
> Whe
Hello,
I don't understand what went wrong or how to fix this. How do I set qr=TRUE
for gam?
When I produce a fit using gam like this:
fit = gam(y~s(x),data=as.data.frame(l_yx),family=family,control =
list(keepData=T))
...then try to use predict:
(see #1 below in the traceback() )
> traceback()
To get around the issue below, I just wrapped it with try(), but would like
to know how to know the question below.
Thanks!
ben
On Fri, Apr 27, 2012 at 10:13 AM, Ben quant wrote:
> Forgot this: the solution doesn't have to come from the xlsx package...
>
> thanks
>
> ben
Forgot this: the solution doesn't have to come from the xlsx package...
thanks
ben
On Fri, Apr 27, 2012 at 10:08 AM, Ben quant wrote:
> Hello again,
>
> I'd like to determine if an Excel file is open or writable. Can anyone
> help me with that?
>
> I write some
Hello again,
I'd like to determine if an Excel file is open or writable. Can anyone help
me with that?
I write some stats to an .xlsx Excel file using the xlsx package. I can't
write to the file unless its closed. How do I determine if the .xlsx file
is open or closed so I can write to it?
I've
Hello,
Does anyone know how to get the rounding method used for the axis tick
numbers/values in plot()?
I'm using mtext() to plot the values used to plot vertical and horizontal
lines (using abline()) and I'd like these vertical and horizontal line
values to be rounded like the axis tick values a
Hello,
If the exact value does not exist in the vector, can I still get at the
intersections? Is there a simple way to do this and avoid looping? Seems
like there would be a simple R function to do this...
Example:
vec <- c(5,4,3,2,3,4,5)
vec
[1] 5 4 3 2 3 4 5
intersect(vec,2.5)
numeric(0)
I wan
Hello,
I have two date strings, say "1972-06-30" and "2012-01-31", and I'd like to
get every quarter period end date between those dates? Does anyone know how
to do this? Speed is important...
Here is a small sample:
Two dates:
"2007-01-31"
"2012-01-31"
And I'd like to get this:
[1] "2007-03-
Hello,
I'm still hoping my issue is preventable and not worthy of a bug/crash
report, hence my post is in 'help'. Anyway, I'd like to know how to reset
the console so it is clear of all residual effects caused by previous
scripts. Details:
I run a script once and it runs successfully (but very sl
lines(x,l,lty=2)
> lines(x,u,lty=2)
>
>
> --
> Patrick Breheny
> Assistant Professor
> Department of Biostatistics
> Department of Statistics
> University of Kentucky
>
>
>
>
> On 03/14/2012 01:49 PM, Ben quant wrote:
>
>> That was embarrassin
dence intervals will then be
>
> pred$fit + 1.96*se.fit
> pred$fit - 1.96*se.fit
>
> for 95% confidence intervals (replace 1.96 with the appropriate quantile
> of the normal distribution for other confidence levels).
>
> You can then do whatever "stuff" you want to do
Hello,
How do I plot a gam fit object on probability (Y axis) vs raw values (X
axis) axis and include the confidence plot lines?
Details...
I'm using the gam function like this:
l_yx[,2] = log(l_yx[,2] + .0004)
fit <- gam(y~s(x),data=as.data.frame(l_yx),family=binomial)
And I want to plot it so
Joshua,
Just confirming quickly that your method using cmpfun and your f function
below was fastest using my real data. Again, thank you for your help!
Ben
On Sat, Mar 10, 2012 at 1:21 PM, Joshua Wiley wrote:
> On Sat, Mar 10, 2012 at 12:11 PM, Ben quant wrote:
> > Very interesting
ld <-
> matrix(vals2[cbind(c(indx2),rep(1:ncol(indx2),each=nrow(indx2)))],nrow=nrow(indx2),ncol=ncol(indx2))
> test1 <- f2(vals2, indx2)
> all.equal(gold, test1)
>
> system.time(for (i in 1:20) f2(vals2, indx2))
> system.time(for (i in 1:20)
>
> matrix(vals2[cbind(c(indx2),rep(1:ncol(indx2),
Thanks for the info. Unfortunately its a little bit slower after one apples
to apples test using my big data. Mine: 0.28 seconds. Yours. 0.73 seconds.
Not a big deal, but significant when I have to do this 300 to 500 times.
regards,
ben
On Fri, Mar 9, 2012 at 1:23 PM, Rui Barradas wrote:
> Hel
Here is my latest. I kind of changed the problem (for speed). In real life
I have over 300 uadata type matrices, each having over 20 rows and over
11,000 columns. However the rddata file is valid for all of the uadata
matrices that I have (300). What I am doing now: I'm creating a matrix of
row ind
> Hello,
>
> Is this the fastest way to use indices from one matrix to reference rows
> in another smaller matrix? I am dealing with very big data (lots of columns
> and I have to do this lots of times).
>
> ##sample data ##
> vals = matrix(LETTERS[1:9], nrow=3,ncol=3)
> colnames(va
wd)){
d = as.Date(wd[i])
diff = abs(nms - d)
rd_row_idx = max(which(diff == min(diff)))
rd_col_idx = which(as.Date(rd[rd_row_idx,], format="%Y-%m-%d") < d)
rd_col_idx_lag = which(as.Date(rd[rd_row_idx - 1,], format="%Y-%m-%d") <
d)
rd_col_idx_lag2 = which(as.
Hello,
I have two matrices. They both have different row names and column names,
but they have some common row names and column names. The row names and
column names that are the same are what I am interested in. I also want the
columns in the two matrices aligned the same. In the end, I need to d
Hello,
In case anyone is interested in a faster solution for lots of columns. This
solution is slower if you only have a few columns. If anyone has anything
faster, I would be interested in seeing it.
### some mockup data
z.dates =
c("2007-03-31","2007-06-30","2007-09-30","2007-12-31","2008-03-3
=format)
class(DF[, i]) <- "Date"
}
DF
}
rd1 <- fdate(rd1)
# This is yours, use it.
dt1 <- seq(from =as.Date(z.dates[1]), to =
as.Date(z.dates[length(z.dates)]), by ="day")
# Set up the result, no time expensive 'cbind' inside a loop
fin1 <- data.fram
t;- fdate(rd1)
# This is yours, use it.
dt1 <- seq(from =as.Date(z.dates[1]), to = as.Date("2009-03-25"), by =
"day")
# Set up the result, no time expensive 'cbind' inside a loop
fin1 <- data.frame(matrix(NA, nrow=length(dt1), ncol=ncol(ua) + 1))
fin1[, 1] <- d
gt; Mar 05, 2012; 8:53pm by Ben quant Ben quant
> > Hello,
> >
> > Does anyone know of a way I can speed this up?
> >
>
> Maybe, let's see.
>
> >
> > # change anything below.
> >
>
> # Yes.
> # Firs
cn in 1:ncol(ua)){
uac = ua[,cn]
tkr = colnames(ua)[cn]
rdc = rd[,cn]
ua_rd = cbind(uac,rdc)
colnames(ua_rd) = c(tkr,'rt_date')
xx1 = merge(dt,ua_rd,by.x=1,by.y= 'rt_date',all.x=T)
xx = as.character(xx1[,2])
values <- c(NA, xx[!is.na(xx)])
ind = cumsum(!is.na(xx))
Hello,
I have a lot of data and it has a lot of NaN values. I want to compress the
data so I don't have memory issues later.
Using the Matrix package, sparseMatrix function, and some fiddling around,
I have successfully reduced the 'size' of my data (as measured by
object.size()). However, NaN va
Hello,
Thank you for your help/advice!
The issue here is speed/efficiency. I can do what I want, but its really
slow.
The goal is to have the ability to do calculations on my data and have it
adjusted for look-ahead. I see two ways to do this:
(I'm open to more ideas. My terminology: Unadjusted
match(dt, ua$rt_date)
> >
> > # create new result matrix
> > xx1 <- cbind(dt, ua[indx,])
> > rownames(xx1) <- NULL # delete funny names
> > xx1
>dtANamert_date
> 1 2007-03-31 NA
> 2 2007-04-01 14066.58 2007-04-01
>
t 4:37 AM, Hans Ekbrand wrote:
> On Fri, Mar 02, 2012 at 03:24:20AM -0700, Ben quant wrote:
> > Hello,
> >
> > I have a nasty loop that I have to do 11877 times.
>
> Are you completely sure about that? I often find my self avoiding
> loops-by-row by constructing vectors
Hello,
I have a nasty loop that I have to do 11877 times. The only thing that
slows it down really is this merge:
xx1 = merge(dt,ua_rd,by.x=1,by.y= 'rt_date',all.x=T)
Any ideas on how to speed it up? The output can't change materially (it
works), but I'd like it to go faster. I'm looking at gett
Thanks a ton! That is great.
ben
On Thu, Mar 1, 2012 at 9:29 PM, Peter Langfelder wrote:
> On Thu, Mar 1, 2012 at 8:05 PM, Ben quant wrote:
> > Hello,
> >
> > I have another question
> >
> > I have a data frame that looks like this:
> >
Hello,
I have another question
I have a data frame that looks like this:
a b
2007-03-31 "20070514" "20070410"
2007-06-30 "20070814" "20070709"
2007-09-30 "20071115" "20071009"
2007-12-31 "20080213" "20080109"
2008-03-31 "20080514" "20080407"
2008-06-30 "20080
That is great! Thank you very much.
Ben
On Thu, Mar 1, 2012 at 2:57 PM, Petr Savicky wrote:
> On Thu, Mar 01, 2012 at 02:31:01PM -0700, Ben quant wrote:
> > Hello,
> >
> > My direct desire is a good (fast) way to fill values forward until there
> is
> > anot
Hello,
My direct desire is a good (fast) way to fill values forward until there is
another value then fill that value foward in the data xx (at the bottom of
this email). For example, from row 1 to row 45 should be NA (no change),
but from row 46 row 136 the value should be 12649, and from row 13
Great thanks!
ben
On Thu, Mar 1, 2012 at 1:30 PM, Marc Schwartz wrote:
> On Mar 1, 2012, at 2:02 PM, Ben quant wrote:
>
> > Hello,
> >
> > How do I get the dates of all Fridays between two dates?
> >
> > thanks,
> >
> > Ben
>
>
>
Hello,
How do I get the dates of all Fridays between two dates?
thanks,
Ben
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-p
Excellent! I wonder why I haven't seen aggregate before.
Thanks!
ben
On Tue, Feb 28, 2012 at 4:51 PM, ilai wrote:
> aggregate(val~lvls+nm,data=x,FUN='median')
>
>
>
> On Tue, Feb 28, 2012 at 4:43 PM, Ben quant wrote:
> > Hello,
> >
> > I
Hello,
I can get the median for each factor, but I'd like another column to go
with each factor. The nm column is a long name for the lvls column. So
unique work except for the order can get messed up.
Example:
x =
data.frame(val=1:10,lvls=c('cat2',rep("cat1",4),rep("cat2",4),'cat1'),nm=c('longna
Thank you everyone! We already use the Hmisc package so I'll likely use
cut2.
Ben
On Wed, Feb 22, 2012 at 2:22 PM, David Winsemius wrote:
>
> On Feb 22, 2012, at 4:01 PM, Ben quant wrote:
>
> Hello,
>>
>> What is the best way to get ranks for a vector of value
Hello,
What is the best way to get ranks for a vector of values, limit the range
of rank values and create equal count in each group? I call this uniform
ranking...uniform count/number in each group.
Here is an example using three groups:
Say I have values:
x = c(3, 2, -3, 1, 0, 5, 10, 30, -1, 4
Thank you very much! I'll follow-up with more questions as I dabble...if I
have any.
Thank you
ben
On Tue, Feb 21, 2012 at 7:01 AM, Gabor Grothendieck wrote:
> On Tue, Feb 21, 2012 at 12:15 AM, Ben quant wrote:
> > Thanks again for your so far on proto. I have another question
> wrote:
> On Sat, Feb 18, 2012 at 12:44 AM, Ben quant wrote:
> > The code below works as expected but:
> > Using the proto package, is this the best way to 1) make a parameter
> > persist if the parameter is passed
> > in with a value, 2) allow for calling the bias()
I like it better. Thanks!
Ben
On Fri, Feb 17, 2012 at 11:38 PM, Gabor Grothendieck <
ggrothendi...@gmail.com> wrote:
> On Sat, Feb 18, 2012 at 12:44 AM, Ben quant wrote:
> > The code below works as expected but:
> > Using the proto package, is this the best way t
The code below works as expected but:
Using the proto package, is this the best way to 1) make a parameter
persist if the parameter is passed
in with a value, 2) allow for calling the bias() function without a
parameter assignment, 3) have
the x2 value initialize as 5? Thanks for your feedback. Giv
rothendi...@gmail.com> wrote:
> On Wed, Feb 15, 2012 at 11:58 PM, Ben quant wrote:
> > Thank you Duncan. Interesting. I find it strange that you can't get a
> list
> > of the environments. But I'll deal with it...
> >
> > Anyway, I'm about to start a ne
so much for your help.
Ben
On Tue, Feb 14, 2012 at 5:04 AM, Duncan Murdoch wrote:
> On 12-02-14 12:34 AM, Ben quant wrote:
>
>> Hello,
>>
>> I can get at environments if I know their names, but what if want to look
>> at what environments currently exist at some poin
Hello,
I can get at environments if I know their names, but what if want to look
at what environments currently exist at some point in a script? In other
words, if I don't know what environments exist and I don't know their
sequence/hierarchy, how do I display a visual representation of the
enviro
Oops. I guess I stopped reading about the fsep param when I saw PATH and
R_LIB because I'm not interested in those. I didn't get to the part I was
interested in. Thanks!
Ben
On Wed, Dec 28, 2011 at 5:33 PM, David Winsemius wrote:
>
> On Dec 28, 2011, at 5:57 PM, Ben quant wrote
rm regardless of the platform:
folders = strsplit(normalizePath(filename, winslash="/"), "/")[[1]]
This will undo the above regardless of the platform:
paste(folders,collapse=file.path('"",""))
Thanks again for your help Duncan!
Ben
> On Wed, Dec 28, 201
Excellent!
Thanks,
ben
On Wed, Dec 28, 2011 at 2:37 PM, Duncan Murdoch wrote:
> On 11-12-28 4:30 PM, Ben quant wrote:
>
>> Hello, (sorry re-posting due to typo)
>>
>> I'm attempting to get the folders of a path in a robust way (platform
>> independent, fo
Hello, (sorry re-posting due to typo)
I'm attempting to get the folders of a path in a robust way (platform
independent, format independent). It has to run on Windows and Linux and
tolerate different formats.
For these: (The paths don't actually exist in Linux but you get the idea.)
Windows:
fil
Hello,
I'm attempting to get the folders of a path in a robust way (platform
independent, format independent). It has to run on Windows and Linux and
tolerate different formats.
For these: (The paths don't actually exist in Linux but you get the idea.)
Windows:
file_full_path = "C://Program File
package 'rzmq' had non-zero exit status
>
Thank you for your help!
Ben
On Wed, Dec 7, 2011 at 7:00 PM, Whit Armstrong wrote:
> subscribe to R-hpc.
>
> and check out these:
> https://github.com/armstrtw/rzmq
> https://github.com/armstrtw/AWS.tools
> https://
Thank you Simon. I already ordered your book.
Regards,
Ben
On Fri, Dec 9, 2011 at 10:49 AM, Simon Wood wrote:
> See help("mgcv-FAQ"), item 2.
>
> best,
> Simon
>
>
> On 09/12/11 15:05, Ben quant wrote:
>
>> Hello,
>>
>> I'd like to unde
Hello,
I'd like to understand 'what' is predicting the response for library(mgcv)
gam?
For example:
library(mgcv)
fit <- gam(y~s(x),data=as.data.frame(l_yx),family=binomial)
xx <- seq(min(l_yx[,2]),max(l_yx[,2]),len=101)
plot(xx,predict(fit,data.frame(x=xx),type="response"),type="l")
I want to
Due to my lack of experience with R and the cloud I am leery about
attempting any patch dev for Windows compatibility. I think it would be
cool to contribute at some point, but I think I am still too new.
Anyway, I'm looking into using my company's linux server via Putty and use
that as my local m
mstrtw/rzmq
> https://github.com/armstrtw/AWS.tools
> https://github.com/armstrtw/deathstar
>
> and this:
> http://code.google.com/p/segue/
>
> If you're willing to work, you can probably get deathstar to work
> using a local windows box and remote linux nodes.
>
> -Whi
Hello,
I'm working with the gam function and due to the amount of data I am
working with it is taking a long time to run. I looked at the tips to get
it to run faster, but none have acceptable side effects. That is the real
problem.
I have accepted that gam will run a long time. I will be running
x))
Coefficients:
(Intercept)x
-2.3129.662
Degrees of Freedom: 690302 Total (i.e. Null); 690301 Residual
Null Deviance: 448800
Residual Deviance: 446800 AIC: 446800
> l_exp_coef = exp(l_logit$coefficients)[2]
> l_exp_coef
x
15709.52
Thanks,
B
tia.crescat.net/static/ben/warn%20num%200%20or%201.pdf
Thank you for your help,
Ben
On Thu, Dec 1, 2011 at 3:25 PM, Ben quant wrote:
> Oops! Please ignore my last post. I mistakenly gave you different data I
> was testing with. This is the correct data:
>
> Here you go:
>
> > at
e are the screen shots of my data that I tried to send earlier
(two screen shots, two pages):
http://scientia.crescat.net/static/ben/warn%20num%200%20or%201.pdf
Thank you,
Ben
On Thu, Dec 1, 2011 at 3:07 PM, Ben quant wrote:
> Here you go:
>
> > attach(as.data.frame(l_yx))
&g
es):
http://scientia.crescat.net/static/ben/warn%20num%200%20or%201.pdf
Thank you,
Ben
On Thu, Dec 1, 2011 at 2:24 PM, peter dalgaard wrote:
>
> On Dec 1, 2011, at 21:32 , Ben quant wrote:
>
> > Thank you for the feedback, but my data looks fine to me. Please tell me
> if I'm not under
.226343e-03 2.732819e-02 2.385092e-04
[496] 4.905250e-02 1.159876e-02 4.068228e-03 3.349013e-02 1.273468e-03
Thanks for your help,
Ben
On Thu, Dec 1, 2011 at 11:55 AM, peter dalgaard wrote:
>
> On Dec 1, 2011, at 18:54 , Ben quant wrote:
>
> > Sorry if this is a duplicate: This is a re-
Sorry if this is a duplicate: This is a re-post because the pdf's mentioned
below did not go through.
Hello,
I'm new'ish to R, and very new to glm. I've read a lot about my issue:
Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred
...including:
http://tolstoy.newcastle.e
Hello,
Is there an example out there that shows how to treat each of the predictor
variable types when doing logistic regression in R? Something like this:
glm(y~x1+x2+x3+x4, data=mydata, family=binomial(link="logit"),
na.action=na.pass)
I'm drawing mostly from:
http://www.ats.ucla.edu/stat/r/da
Hello,
Is there a faster way to do this? Basically, I'd like to NA all values in
all_data if there are no 1's in the same column of the other matrix, iu.
Put another way, I want to replace values in the all_data columns if values
in the same column in iu are all 0. This is pretty slow for me, but
nter wrote:
> ??focus ## admittedly, not the first keyword that comes to mind
> ?bringToTop
>
> -- Bert
>
> On Wed, Nov 16, 2011 at 9:07 AM, Ben quant wrote:
> > Hello,
> >
> > After I plot something how do I reactivate the console (and not the plot
> >
Hello,
After I plot something how do I reactivate the console (and not the plot
window) so I don't have to click on the console each time to go to the next
command?
Example that does not work:
fun = function(x){ plot(x); dev.set(dev.prev())}
fun(1:4)
...and another that does not work:
fun = fun
df('
>select t.*
>, r.start
>, r.end
>from total t, commRange r
>where t.comm = r.comm and
>t.loc between r.start and r.end and
>t.loc != t.new
>')
>
> On T
Hello,
When I do:
dbWriteTable(con, "r.BOD", cbind(row_names = rownames(BOD), BOD))
...can I specify the data types such as varchar(12), float, double
precision, etc. for each of the fields/columns?
If not, what is the best way to create a table with specified field data
types (with the RpgSQL
Hello,
I'm using package RpgSQL. Is there a better way to create a multi-line
query/character string? I'm looking for less to type and readability.
This is not very readable for large queries:
s <- 'create table r.BOD("id" int primary key,"name" varchar(12))'
I write a lot of code, so I'm looki
This is great, thanks!
I have another unrelated question. I'll create a new email for that one.
ben
On Mon, Nov 7, 2011 at 4:16 PM, Gabor Grothendieck
wrote:
> On Mon, Nov 7, 2011 at 5:34 PM, Ben quant wrote:
> > Hello,
> >
> > Using the RpgSQL package, there mu
Hello,
Using the RpgSQL package, there must be a way to get the row names into the
table automatically. In the example below, I'm trying to get rid of the
cbind line, yet have the row names of the data frame populate a column.
> bentest = matrix(1:4,2,2)
> dimnames(bentest) = list(c('ra','rb'),c(
Hello,
Could someone who has experience with or knowledge regarding both
RPostgreSQL and RpgSQL packages provide some feedback? Thanks! I am most
interested in hearing from people who have knowledge regarding both
packages, not just one.
The only real difference I can see is that RpgSQL has a Jav
6085527 -0.1102456 -0.2470147
V5
...etc...
Ben
On Thu, Oct 27, 2011 at 1:37 PM, Nordlund, Dan (DSHS/RDA) <
nord...@dshs.wa.gov> wrote:
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> > project.org] On Behalf Of Be
ace(dat,'X.0.','-0.')
> > dat
> [1] "X0.0" "-0.24" "X0.35" "-0.211"
> > dat<-str_replace(dat,'X','')
> > dat
> [1] "0.0""-0.24" "0.35" "-0.211&qu
Hello,
Why do I get preceding "X." (that is a and X followed by a period) for
negative numbers and an "X" for positive numbers when I read a csv file? Am
I stuck with this? If so, how do I convert it to normal numbers?
dat=read.csv(file_path)
> dat
[1] X0.0 X.0.240432350374 X0.
Hello,
How do I inherit two classes using the R.oo package. Below is kind of a
silly example, but I am trying to create class PerDog from classes Dog and
Person. Error at bottom. I've tried a few other ways of using extend(), but
nothing seems to get me what I want.
Example:
setConstructorS3("Pe
Perfect, thanks!
ben
On Tue, Oct 25, 2011 at 8:12 AM, Eik Vettorazzi wrote:
> Hi Ben,
> maybe mtext is of more help here?
>
> par(mar=c(7,3,3,3))
> plot(year,rate,main='main',sub='sub')
> mtext('test',cex=1,side=1,line=5)
> box()
>
> che
Hello,
Someone (Erik) recently posted about putting text on a plot. That thread
didn't help. I'd like to put text directly below the 'sub' text (with no
gap). The code below is the best I can do. Note the large undesirable gap
between 'sub' and 'test'. I'd like the word 'test' to be just below the
Hello (Heinrich),
I did not know I could do this. It doesn't seem to be documented anywhere.
Thought this would be helpful to the fraction of the community using package
R.oo. Note the call of a setMethodS3 method, xOne, in the setConstructorS3.
This is extremely useful if xOne (in this case) is a
100 matches
Mail list logo