Re: [R] strangely long floating point with write.table()

2014-03-15 Thread Mike Miller
135 0.14 0.145 0.15 0.155 0.16 Importantly, if I do this... write.table(seq(0.005,0.160,.005), file="data.txt", row.names=F, col.names=F) ...I'm producing all the same values, but no number in the output file exceeds three digits to the right of the decimal. Thanks again for

Re: [R] strangely long floating point with write.table()

2014-03-14 Thread Mike Miller
On Fri, 14 Mar 2014, Duncan Murdoch wrote: On 14-03-14 8:59 PM, Mike Miller wrote: What I'm using: R version 3.0.1 (2013-05-16) -- "Good Sport" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-unknown-linux-gnu (64-bit) That's not current, b

[R] strangely long floating point with write.table()

2014-03-14 Thread Mike Miller
be to 7 digits, why am I getting 17 digits for exactly two of the records? Why does this happen for all three numbers in those two records? If you think this is a bug that I should report elsewhere, let me know. Thanks. Mike $ gawk -F'\t' '{print $18,$20,$21}' data.t

Re: [R] Another question about bootstrapping cor

2014-03-06 Thread Conklin, Mike (GfK)
Read the help on boot. Specifically in non-parametric bootstrapping the statistic function takes a data (the original data) and an index number that shows which rows are taken in the bootstrap sample. So you need to do the following. x <- 1:15 y <- c(2,4,1,3,5, 7,6, 9,10,8, 14, 13, 11, 15, 12)

[R] AIX 7.1 and R build problems

2014-03-05 Thread Mike Beddo
Has anyone managed to build R-3.0.2 from source on AIX 7.1 using gcc 4.2.0. The configure script finishes with: ... checking whether wctrans exists and is declared... no checking whether iswblank exists and is declared... no checking whether wctype exists and is declared... no checking whether is

Re: [R] r noobie, reading my text file into r

2014-02-06 Thread Conklin, Mike (GfK)
When starting out I sometimes find it easier to do the following: Ceosalary<-read.table(file.choose(),sep="\t") This will give you a dialog box to find the file you want and you won't have to worry about getting the full path exactly right. Hth, Mike W. Michael Conk

[R] help with ggplot legend specification

2013-10-31 Thread Conklin, Mike (GfK)
F q504527 0.6718266 -0.3457172 10 z G Thanks all //Mike W. Michael Conklin Executive Vice President | Marketing Science GfK Custom Research, LLC | 8401 Golden Valley Road | Minneapolis, MN, 55427 T +1 763 417 4545 | M +1 612 567 8287 www.gfk.com<http://www.gfk.com/>

[R] automatic history file append with every command?

2013-09-17 Thread Mike Miller
ing a lot of unnecessary writing. Luckily, my R history is usually quite short. So if I were to enter 100 commands, appending would write 100 lines, but overwriting would write 5050 lines. savehistory: http://stat.ethz.ch/R-manual/R-devel/library/utils/html/savehistory.html Best, Mike -

[R] netlogo r-extension loadlibrary() failures

2013-08-28 Thread Mike Landis
Trying to access R from Netlogo5 (using the NetLogo R-Extension), running the configuration validation tests in NetLogo5/extensions/r/Systemcheck.nlogo, I get several loadlibrary() errors ... in rJava Check2, > library(rJava); .path.package('rJava') Error : .onLoad failed in loadNamespace() fo

Re: [R] descriptive stats by cells in factorial design

2013-08-07 Thread Mike Miller
38.0 41.444.6 65.3 331 0 24 Parent MZ Male 17notES 46.7 5.242 34.543.1 45.949.0 63.8 131 0 Thanks to all. Mike -- Michael B. Miller, Ph.D. Minnesota Center for Twin and Family Research Department of Psychology Universit

Re: [R] descriptive stats by cells in factorial design

2013-08-06 Thread Mike Miller
to format the numbers using something like format=c(rep("%.2f",7), rep("%d",2)). Mike -- Michael B. Miller, Ph.D. Minnesota Center for Twin and Family Research Department of Psychology University of Minnesota On Mon, 5 Aug 2013, David Carlson wrote: This is a bit simpl

Re: [R] descriptive stats by cells in factorial design

2013-08-04 Thread Mike Miller
2 21 Parent MZ Female 17notES 46.36490 5.1770435 34.88 42.4200 45.950 49.4950 63.18155 22 Parent MZ Male 11 ES 43.40787 5.3507439 31.28 39.9700 43.440 46.4800 64.65197 23 Parent MZ Male 11notES 41.56363 4.656

Re: [R] rms plot.Predict when type="p"

2013-08-03 Thread Mike Babyak
As always, Frank, thanks for the help. Much appreciated. Mike Babyak Department of Psychiatry and Behavioral Sciences Duke University Medical Center R version 3.01 Windows 7 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] descriptive stats by cells in factorial design

2013-08-03 Thread Mike Miller
s for the cells of the factorial design, that could be nice to have. It seems like this sort of thing must already have been worked out. Thanks in advance. Mike -- Michael B. Miller, Ph.D. Minnesota Center for Twin and Family Research Department of Psychology University of Minn

Re: [R] Editing code in a function? related to allowing zero weights in lmer()

2013-08-02 Thread Mike Rennie
me additional packages (R.oo, R.methodsS3 before you can use it. On Fri, Aug 2, 2013 at 12:03 AM, Mike Rennie wrote: > Indeed- thanks for the tips to get me going. This just kicks things up a > notch for me, having happily used packages without wanting to tinker with > them till now. > >

Re: [R] install-packages

2013-08-01 Thread Mike Rennie
Try typing this into google search bar: [R] install packages The majority of the results on the first page will help you out. On Thu, Aug 1, 2013 at 8:43 PM, Said Filahi wrote: > hello, > i am new and I want to know how to install a packare on R > > thank you > > > said filahi > > [[a

[R] Editing code in a function?

2013-08-01 Thread Mike Rennie
Hi folks, I've not before had to edit code right in a function, but I think I need to. I am using lmer() and want to use a model that uses zero weights. I found this thread from 2009: https://stat.ethz.ch/pipermail/r-sig-mixed-models/2009q1/001995.html but I'm unsure of how I would actually go a

[R] rms plot.Predict when type="p"

2013-08-01 Thread Mike Babyak
I notice that the lwd argument has no effect, so I am assuming this is controlled by something else, but I haven't found it yet. I'd be grateful if somebody could point me in the right direction. Thanks, Mike Babyak Department of Psychiatry

[R] ggmap, hexbin and length distortion in Lat/long

2013-05-24 Thread Mike Bock
n I get ggmap to convert the baselayer to NAD84 and just do everything in NAD(my preferred option)? I have tried converting Lat Long to NAD84 and back but the coordinates are coming up in the eastern Pacific and not in California, so I am missing something and I am not sure that is the best way to

Re: [R] Behaviors of diag() with character vector in R 3.0.0

2013-04-09 Thread Mike Cheung
Thanks, A.K. I managed to create diagonal matrices for character vectors. Since this new behavior broke a package that I have written, I would like to make sure that this new behavior was not introduced by mistakes. If this new behavior is final, I will modify my code to fit it. Mike On Tue

[R] Behaviors of diag() with character vector in R 3.0.0

2013-04-09 Thread Mike Cheung
ctors and matrices, whereas the version in 3.0.0 works for character matrices but not character vectors. Would it be possible to retain the behaviors of diag() for character vectors? Thanks. Mike -- - Mike W.L.

Re: [R] prcomp() and varimax()

2013-04-07 Thread Mike Amato
e rotated model (pca3) would explain an identical amount of variance- this is real data, so the first component should explain more variance than the second, and so on. Thanks for the help, Mike On 4/7/2013 6:38 AM, S Ellison wrote: >> My concern is with the reported proportions

[R] prcomp() and varimax()

2013-04-04 Thread Mike Amato
he output when using the base package functions. Am I doing something wrong when attempting to retain only 3 components? Am I using varimax() incorrectly? Am I misinterpreting the returned values from varimax()? Thanks for any help, Mike Here is a link to the data file I am using: https

[R] Question: how to convert raw to numeric

2013-04-03 Thread Mike Chen
I know that there is a function to convert binary data to string named rawToChar.but I wander is there any similar function for "Integer" and "float".I need to read some binary file in "integer" and "float" data. I can do this job in this way: (as below) first convert 4 byte raw to bits then pack

Re: [R] Finding the knots in a smoothing spline using nknots

2013-03-06 Thread Mike Nielsen
Thanks, David! That makes sense. I shall re-read the manual page again. Regards, Mike Nielsen On Wed, Feb 27, 2013 at 12:19 PM, David Winsemius wrote: > > On Feb 27, 2013, at 6:39 AM, Mike Nielsen wrote: > > > Hi r-helpers. > > > > Please forgive my ignorance,

Re: [R] solving x in a polynomial function

2013-03-01 Thread Mike Rennie
Doh- I'm a moron. I get it now. The last line is the confirmation that function "realroots" is working. Sorry- late in the day on a friday. Thanks everyone for your help with this- Uber-useful, and much appreciated. Mike On 3/1/13, Mike Rennie wrote: > Hi Peter, > > Wit

Re: [R] solving x in a polynomial function

2013-03-01 Thread Mike Rennie
else + r <- polyroot(c(-b, coef(model))) + Re(r[is.zero(Im(r))]) + } > > r <- realroots(po.lm, 5) > predict(po.lm, newdata = data.frame(b = r)) 1 2 5 5 This function just returns what I feed it as written. Mike On 3/1/13, Peter Ehlers wrote: >

Re: [R] solving x in a polynomial function

2013-03-01 Thread Mike Rennie
> > if(names(model)[1] == "(Intercept)") > > A.K. > > > > - Original Message - > From: Rui Barradas > To: Mike Rennie > Cc: r-help Mailing List > Sent: Friday, March 1, 2013 3:18 PM > Subject: Re: [R] solving x in a polynomial function

[R] solving x in a polynomial function

2013-03-01 Thread Mike Rennie
Hi there, Does anyone know how I solve for x from a given y in a polynomial function? Here's some example code: ##example file a<-1:10 b<-c(1,2,2.5,3,3.5,4,6,7,7.5,8) po.lm<-lm(a~b+I(b^2)+I(b^3)+I(b^4)); summary(po.lm) (please ignore that the model is severely overfit- that's not the point).

[R] Finding the knots in a smoothing spline using nknots

2013-02-27 Thread Mike Nielsen
t;ispar" "iter" $ fit :List of 5 ..$ knot : num [1:31] 0 0 0 0 0.041 ... ..$ nk : num 27 ..$ min : num 0 ..$ range: num 12.6 ..$ coef : num [1:27] 2.88e-05 1.72e-01 5.19e-01 9.04e-01 1.05 ... ..- attr(*, "class")= chr "smooth.spline.fit" $ call

Re: [R] Simple - Finding vector in a vector

2012-10-08 Thread Mike Spam
ounces@r- >> project.org] On Behalf Of Jessica Streicher >> Sent: Monday, October 08, 2012 9:19 AM >> To: Mike Spam >> Cc: r-help@r-project.org >> Subject: Re: [R] Simple - Finding vector in a vector >> >> > x<-c(NA , 1 ,NA, 1 , 1 , 1 , 1 , 1 ,1 ,N

Re: [R] Simple - Finding vector in a vector

2012-10-08 Thread Mike Spam
be something like, 1 1 1 3 3 3 3 1 1 but anyway i can work with rle, if there is no suitable function. thanks, Nico 2012/10/8 Mike Spam : > Hey Rui, > > Perfect! Thanks!! :) > > Nico > > 2012/10/8 Rui Barradas : >> Hello, >> >> See ?rle >> >&

Re: [R] Simple - Finding vector in a vector

2012-10-08 Thread Mike Spam
Hey Rui, Perfect! Thanks!! :) Nico 2012/10/8 Rui Barradas : > Hello, > > See ?rle > > Hope this helps, > > Rui Barradas > Em 08-10-2012 13:55, Mike Spam escreveu: >> >> Hi, >> >> just a simple question. >> Assumed i have a vector, >&

[R] Simple - Finding vector in a vector

2012-10-08 Thread Mike Spam
Hi, just a simple question. Assumed i have a vector, FALSE TRUE TRUE TRUE FALSE TRUE FALSE TRUE FALSE or NA 1 1 1 NA 1 NA 1 NA what i need is the position where an element is the same - three (or in general multiple) times in a row. in this case: i want to get the position where it is

Re: [R] R process must die - can I save history? [SOLVED]

2012-10-02 Thread Mike Miller
reattach to the R session and also kill it without losing history and data. This is a big deal for me because I get stuck like that about once a year and it's always a huge pain. Mike On Tue, 2 Oct 2012, Ista Zahn wrote (off-list): If you can find the process ID you can try connecting the

[R] R process must die - can I save history?

2012-10-02 Thread Mike Miller
ell the running R process to write the history somewhere? Thanks in advance. Mike -- Michael B. Miller, Ph.D. Minnesota Center for Twin and Family Research Department of Psychology University of Minnesota __ R-help@r-project.org mailing list https

Re: [R] effective way to return only the first argument of "which()"

2012-09-20 Thread Mike Spam
gt; } >> >> return(NULL) >> } >> >>> system.time(for(i in 1:100)which(x>0.999)[1]) >> utilisateur système écoulé >> 9.740 5.795 15.890 >>> system.time(for(i in 1:100)which.max(x>0.999)) >> utilisateur système écoul

Re: [R] effective way to return only the first argument of "which()"

2012-09-19 Thread Mike Spam
Hi, Thanks Michael, but i think this is even slower. x <-sample(2000) which(x < 5)[1] which.max(x < 5) system.time(for(i in 1:100) which.max(x < 5)) User System verstrichen 60.84 13.70 86.33 system.time(for(i in 1:100) which(x < 5)[1]) User Syste

[R] effective way to return only the first argument of "which()"

2012-09-19 Thread Mike Spam
Hi, I was looking for a function like "which()" but only returns the first argument. Compare: x <- c(1,2,3,4,5,6) y <- 4 which(x>y) returns: 5,6 which(x>y)[1] returns: 5 which(x>y)[1] is exactly what i need. I did use this but the dataset is too big (~18 mio. Points). That's why i need a more

[R] Compiling R2.15.1 on ubuntu with x86-64 architecture and shared library

2012-09-17 Thread Conklin, Mike (GfK Custom Research NA)
ve no idea how to recompile with -fPIC Any help would be appreciated. Mike W. Michael Conklin Executive Vice President | GfK Marketing Science | Consumer Experiences North America GfK Custom Research, LLC | 8401 Golden Valley Road | Minneapolis, MN, 55427 T +1 763 417 4545 | M +1 612 567 8287 w

[R] split plot experiment with a repeated measure

2012-09-13 Thread Mike Palmer
full response~treatment_1*treatment_2*sample_time model, but don't know what the structure should be, or even whether this is a viable analysis. I should probably add that neither the main or sub plots are randomised. Thanks Mike Palmer __ R-h

[R] Setwd to a directory that requires authentication

2012-09-11 Thread Mike Smith
I work at a company where we log on to windows using a username and password. There is a global server with files that I need to use R to do some analysis on. That server requires my windows credentials to logon. When I access the server from internet explorer it automatically uses my windows cre

Re: [R] Pseudo R squared in gls model

2012-08-24 Thread Mike Miller
if you can't access that PDF and I'll send a copy. Mike -- Michael B. Miller, Ph.D. Minnesota Center for Twin and Family Research Department of Psychology University of Minnesota__ R-help@r-project.org mailing list https://stat.ethz.ch/mailma

[R] Question on meaning of '%+%', '%?%' (? = various single letter) in code

2012-05-31 Thread Mike Hilt
and it failed to work! I loaded xts package (must have xts and zoo installed b/c xts has a dependency on zoo.) Entered the following: > library(xts) > data(sample_matrix) > x1 <- sample_matrix > x1 > x3 <- x1 %/% x1 > x3 > x4 <- x1 %+% x1 MH (Mike Hilt comment): After ente

[R] Multiple rms summary plots in a single device

2012-05-25 Thread Mike Harwood
e data.table logic in case it may be having some influence. Thank you! Mike tData <- data.frame(groups=as.factor(1:8), low=as.factor(1:4) ,high=as.factor(seq(100, 400, 100)), rand=runif(400)) tData <- data.table(tData) setkeyv(tData, 'groups') dd <- datadist(

[R] Reading Excel Formulas as values

2012-05-15 Thread Mike Smith
When I read excel files using the read.xlsx() command any cells that have formulas in them come up as NA. Is there a way to read just the numeric value of the cell without using the "paste value" command in Excel? I need to read in hundreds of Excel spreadsheets and compile them into one large su

[R] Can't read xlsx file into R. Seem, Seem to have XLConnect loaded.

2012-05-09 Thread Mike Hilt
t; OlPrcFl <- loadWorkbook(“Oil Dly YTD1204 v01.xlsx”, create = FALSE) Error: unexpected input in "OlPrcFl <- loadWorkbook(“" I can read an xlsx file in when I do: > OlPrcFl <- loadWorkbook(file.choose()) That is not a real, long-term sol

[R] question on jitter in plot.Predict in rms

2012-04-30 Thread Mike Babyak
e. for example, would there be a way to produce the group variable with the disparate Ns more directly? Thanks, Mike Babyak Behavioral Medicine Research Center Duke University Medical Center #question about jitter/llist in rms #R v 2.14.1

Re: [R] generate random numbers for lotteries

2012-04-29 Thread Mike Miller
ot of different languages. Sample() is faster, too. Mike __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] generate random numbers for lotteries

2012-04-29 Thread Mike Miller
mplish the same thing. To make random integers from 1 to K, do this: ceiling( K*runif(N) ) Mike __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] generate random numbers for lotteries

2012-04-28 Thread Mike Miller
On Fri, 27 Apr 2012, Vale Fara wrote: I am working with lotteries and I need to generate two sets of uniform random numbers. Requirements: 1) each set has 60 random numbers random integers? 2) random numbers in the first set are taken from an interval (0-10), whereas numbers in the second s

Re: [R] Completely Off Topic:Link to IOM report on use of "-omics" tests in clinical trials

2012-03-27 Thread Mike Marchywka
Thanks, I had totally missed this controversy but from quick read of summary the impact on open source analysis was unclear.Can you explain the punchline? I think many users of R have concluded the biggest problem in most analyses isfirst getting the data and then verfiying any results you

Re: [R] sqrt(-x) vs. -x^0.5

2012-03-21 Thread Mike Williamson
nsistent & accurate, so that I didn't find myself in another pickle like "weak" typing and attempts to use time /date classes in 'R' have brought me. Thanks! Mike --- [The theory of gravity] is t

[R] sqrt(-x) vs. -x^0.5

2012-03-21 Thread Mike Williamson
d sqrt. What is the theoretical difference / meaning between these two operations? Thanks! Mike --- [The theory of gravity] is to me so great an absurdity that I believe no Man who has in philosophical matters a competent faculty of th

[R] confidence intervals in dotplots in a for loop

2012-03-06 Thread Byerly, Mike M (DFG)
panel.xyplot(x,y,pch=16,cex=1) panel.segments(dat$lci95,as.numeric(y),dat$uci95,as.numeric(y), lty=1, col=1) panel.segments(dat$lci90,as.numeric(y),dat$uci90,as.numeric(y), lty=1, lwd=4, col='grey60') panel.xyplot(x,y,pch=16,cex=1.2,col='white') panel.xyplot(x

Re: [R] The Future of R | API to Public Databases

2012-01-14 Thread Mike Marchywka
LOL, I remember posting about this in the past. The US gov agencies vary but mostare quite good. The big problem appears to be people who push proprietary orcommercial "standards" for which only one effective source exists. Some formats,like Excel and PDF come to mind and there is a distu

Re: [R] how to combine grouped data and ungrouped data in a trellis xyplot

2012-01-09 Thread Mike Dahman
zation", panel=function(x,y,groups,subscripts,...){ panel.xyplot(x,y,groups=groups,subscripts=subscripts,...) panel.lines(filt_zone_df$dt[subscripts],filt_zone_df$mem[subscripts],col="red") }, as.Table=T, subscripts=T) Regards, -mike On Mon, Jan 9, 2012

[R] glmmPQL and predict

2012-01-09 Thread Mike Harwood
t is included > 1/(1+exp(-3.412014)) ## only the fixed effect [1] 0.9680779 > 1/(1+exp(-1*(3.412014+0.63614382))) ## fixed and random effect intercepts [1] 0.9828449 Thanks! Mike __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

[R] how to combine grouped data and ungrouped data in a trellis xyplot

2012-01-07 Thread Mike Dahman
find from googling show folks listing group as an argument, and sometimes have something like groups=groups. I've tried a number of things and thought it is time to ask for help. Regards, -mike [[alternative HTML version deleted]] __

Re: [R] Dropping columns from data frame

2012-01-06 Thread Mike Harwood
<- orig.df[,-c(1,3,5)] > head(new.df,2) num11.20 lc11.20 uc11.20 1 11 k K 2 12 l L On Jan 6, 9:49 am, David Winsemius wrote: > On Jan 6, 2012, at 10:00 AM, Mike Harwood wrote: > > > How does R do it, and should I ever be worried?  I always

[R] Dropping columns from data frame

2012-01-06 Thread Mike Harwood
# Illustration 3: contiguous columns at end of data frame head(orig.df[,-c(4:6)]) ## as expected # Illustrations 4-5: unary errors head(orig.df[,-c(as.list('num1.10', 'lc1.10', 'uc1.10'))]) head(orig.df[,-c('num1.10', 'lc1.10', 'uc1.10')])

[R] Can levelplot colorkeys display a logarithmic scale evenly?

2012-01-05 Thread Mike MacFerrin
y using polygon calls and user coordinates)? Or are there other levelplot-like functions that would facilitate this? Any help is appreciated, - Mike __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] empty files created with trellis xyplot jpeg device

2012-01-01 Thread Mike Dahman
nt it at the end of the function. before: xyplot(...) after: xyp<-xyplot(...) print(xyp) Works great. Regards, -mike On Sun, Jan 1, 2012 at 1:40 AM, R. Michael Weylandt < michael.weyla...@gmail.com> wrote: > I'm guessing R FAQ 7.22: http://cran.r-project.org/doc/FAQ/R-FAQ

[R] empty files created with trellis xyplot jpeg device

2011-12-31 Thread Mike Dahman
related to trellis charts. Any help to troubleshoot this is appreciated. Regards, -mike R version 2.14.0 (2011-10-31) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-unknown-linux-gnu (64-bit) # validate devices > capabilities() jpeg

Re: [R] HELP!! - PHP calling R to execute a r-code file (*.r)

2011-12-31 Thread Mike Marchywka
> Date: Fri, 30 Dec 2011 16:04:08 -0600 > From: xiuquan.w...@gmail.com > To: r-help@r-project.org > Subject: [R] HELP!! - PHP calling R to execute a r-code file (*.r) > > Hi, > > I have met a tough problem when using PHP to call R to generate some

Re: [R] Quotes inside char string

2011-12-20 Thread Mike Pfeiff
Duncan, Thank you for referring me to Uwe's answer. -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Tuesday, December 20, 2011 1:14 PM To: Mike Pfeiff Cc: 'R-help@r-project.org' Subject: Re: [R] Quotes inside char string On 20/12/201

Re: [R] Quotes inside char string

2011-12-20 Thread Mike Pfeiff
e] Sent: Tuesday, December 20, 2011 1:20 PM To: Mike Pfeiff Cc: 'R-help@r-project.org' Subject: Re: [R] Quotes inside char string On 20.12.2011 20:10, Mike Pfeiff wrote: > How do I return a character string with quotes inside string? > > For example, what logic do I use if

[R] Quotes inside char string

2011-12-20 Thread Mike Pfeiff
How do I return a character string with quotes inside string? For example, what logic do I use if I want to return the following: Test Score="A" I tried the following Score<-paste("Test Score=","A",sep='"') But it returned a "\" inside: "Test Score=\"A"

Re: [R] RODBC Error: 'getCharCE' must be called on a CHARSXP

2011-12-20 Thread Mike Pfeiff
e extra "\"' is improper SQL form. Maybe I should be asking what is the proper way to return "" inside of a char string? -Original Message- From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Sent: Tuesday, December 20, 2011 8:46 AM To: Mike Pfeiff Cc: 

[R] RODBC Error: 'getCharCE' must be called on a CHARSXP

2011-12-20 Thread Mike Pfeiff
I am trying to connect to an internal database and use the sqlQuery command to reduce and retrieve data using the following code: channel <-odbcConnect("some_dsn", uid="", pwd="") txt<-'SELECT Date, Region, Price FROM TableXYZ WHERE Type="Domestic"' sqlQuery(channel, cat(txt,"\n"),errors=TRUE,) c

[R] Simple R server for SQL Server?

2011-12-14 Thread Mike Beddo
code examples for 1) would be helpful, but advice would be better. - Mike Beddo [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting gui

[R] Fwd: tcplot documentation in evd package

2011-12-13 Thread Mike Harwood
This issue occurs only when both the evd and ismev packages are loaded. Please retract this posting, if possible. Thank you in advance! Mike -- Forwarded message -- From: Mike Harwood Date: Mon, Dec 12, 2011 at 7:47 PM Subject: tcplot documentation in evd package To: r-help@r

[R] tcplot documentation in evd package

2011-12-12 Thread Mike Harwood
Error in fpot(data, u[1], model = model, cmax = cmax, r = r, ulow = ulow, : `x' must be a non-empty numeric vector tcplot(portpirie$SeaLevel, tlim) ## Resolves Issue gpd.fitrange(portpirie$SeaLevel, 3.6, 4.2) ## An alternative, still naming the SeaLevel v

Re: [R] any updates w.r.t. lapply, sapply, apply retaining classes

2011-11-03 Thread Mike Williamson
ability to handle higher level math, that this issue is making 'R' a less desirable language to use, as time progresses. I don't mean to claim that my opinion is the end-all-be-all, but I would like to hear others chime in, whether this is a large concern, or whether there is a ver

[R] any updates w.r.t. lapply, sapply, apply retaining classes

2011-11-03 Thread Mike Williamson
cycle time will be. However, I spend much of my time fighting all these class & typing bugs in 'R' (and we have to start recognizing that they are bugs, otherwise they may never get resolved), such that many of the improvements in my productivity due to all the wonderful computational pac

Re: [R] R shell line width

2011-10-06 Thread Mike P
Thank you very much for your responses! This is exactly what I needed. On Fri, Sep 16, 2011 at 8:13 PM, Joshua Wiley wrote: > Hi Mike, > > Look at ?options  particularly something like: > > options(width = 120) > > 80 is the default, I believe.  On 1920 pixels I can comfort

Re: [R] any way to convert back to DateTime class when "accidental" conversion to numeric?

2011-10-06 Thread Mike Williamson
that everything is clean. In this particular case above where I was asking, this is really for exploratory work. Once I get a solution, I will likely handle typing outside of 'R'. Thanks for the advice! Regards,

[R] any way to convert back to DateTime class when "accidental" conversion to numeric?

2011-10-05 Thread Mike Williamson
10-05 16:28:39 PDT" date time class which originally generated it. Thanks! Mike --- XKCD <http://www.xkcd.com> [[alternative HTML version deleted]] __ R-help@r-project.org mailing lis

Re: [R] read .csv from web from password protected site

2011-10-03 Thread Mike Pfeiff
e website do not require me to reenter info. -Original Message- From: Sarah Goslee [mailto:sarah.gos...@gmail.com] Sent: Monday, October 03, 2011 3:07 PM To: Mike Pfeiff; r-help Subject: Re: [R] read .csv from web from password protected site Hi, I've assumed that you meant to se

[R] read .csv from web from password protected site

2011-10-03 Thread Mike Pfeiff
guidance would be greatly appreciated. Sincerely, Mike [[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-project.org/posti

[R] need help with contourplot figure

2011-09-30 Thread Mike Gibson
le="C:/Documents and Settings/Michael/My Documents/Mike/amberjack/Reefs_Model/YPRlevel.jpg", width=8,height=8, unit="in", res=300) #location of file and size x<-contourplot(YPR~F*Length, data=yprplot2, at=c(2.0,3.0,4.0,5.0,5.5,6.0,6.25,6.5,6.75,7.0,7.12,7.25,7.35,7.45,7.5), yli

[R] survexp with large dataframes

2011-09-28 Thread Mike Harwood
fitted survival with the Kaplan-Meier plot. Below is the code with output and [unfortunately] errors. Is there something wrong in my use of cluster in generating the proportional hazards model, or is there some syntax to pass it into survexp? Mike > dim(dev) [1] 899876 25 > mod1 &l

[R] R shell line width

2011-09-16 Thread Mike P
Hi, I want to apologize in advance if this has already been asked. I wasn't able to find any information, either on google or from local list search. I'm running an R shell from a linux command line, in an xterm window. Whenever I print a data frame, only the first couple of columns are printed s

[R] Problem looping a function to create/add to new dataframe

2011-09-15 Thread Mike Treglia
.data<-sapply(vector, function, i) } Please let me know if more detail on my code would be helpful- I was just trying to keep it simple and focus on what I saw as the problem at hand for now. Thank you for your help. Sincerely, Mike Treglia -- Michael Treglia Applied Biodiversity Sciences

Re: [R] storage and single-precision

2011-09-08 Thread Mike Miller
On Thu, 8 Sep 2011, William Dunlap wrote: Use gzcon() to make a compressed connection and any function that write to a connection will write compressed data. E.g., > con <- gzcon(file("tempfile.junk", "wb")) > x <- as.integer(rep(c(-127, 1, 127), c(3,2,1))) > writeBin(x, con, size=1) > cl

Re: [R] storage and single-precision

2011-09-08 Thread Mike Miller
On Thu, 8 Sep 2011, Duncan Murdoch wrote: On 11-09-07 6:25 PM, Mike Miller wrote: I'm getting the impression from on-line docs that R cannot work with single-precision floating-point numbers, but that it has a pseudo-mode for single precision for communication with external programs

[R] storage and single-precision

2011-09-07 Thread Mike Miller
ored data files. Thanks in advance. Best, Mike -- Michael B. Miller, Ph.D. Minnesota Center for Twin and Family Research Department of Psychology University of Minnesota __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

Re: [R] Convert CSV file to FASTA

2011-08-31 Thread Mike Marchywka
> Date: Wed, 31 Aug 2011 01:36:51 -0700 > From: oliviacree...@gmail.com > To: r-help@r-project.org > Subject: [R] Convert CSV file to FASTA > > Hi there, > > I have large excel files which I can save as CSV files. > > Each excel file contain

Re: [R] questions about "metafor" package

2011-08-22 Thread Mike Cheung
oper, L. V. Hedges, & J. C. Valentine (Eds.), The handbook of research synthesis and meta-analysis. (2nd ed., pp. 357-376). New York: Russell Sage Foundation. Regards, Mike -- ----- Mike W.L. Cheung Phone: (65) 6

Re: [R] write.table extra column

2011-08-15 Thread Mike Hunter
e 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. Please excuse my brevity. >

[R] write.table extra column

2011-08-15 Thread Mike Hunter
In the following data.frame there are 6 columns, but 7 are written to the CSV file. install.packages("pmlr") library(pmlr) data(enzymes) write.table(enzymes, sep=",", eol="\n",file="albert.csv") __ R-help@r-project.org mailing list https://stat.ethz.ch/

Re: [R] S4 classes, some help with the basics

2011-08-09 Thread Mike Williamson
Thanks Duncan, Martin, You both provided exactly what I needed! Regards, Mike --- XKCD <http://www.xkcd.com> On Mon, Aug 8, 2011 at 5:21 PM, Duncan Murdoch wrote: > On 08/08/2011 8:04 PM, Mike Williamson wrote: > >> H

[R] S4 classes, some help with the basics

2011-08-08 Thread Mike Williamson
ld type myPCA[i] for arrays, where "i" again can be either a numeric index or the name. Without this ability to identify portions within an array / loop context, it becomes exceedingly difficult to work in "S4 land". How is this sort of thing done?

[R] running slope

2011-07-29 Thread Byerly, Mike M (DFG)
Is there a function in R that will calculate a running linear slope similar to the way the function filter() will calculate a moving average? Mike Byerly Fisheries Biologist Commercial Fisheries Division Alaska Dept. of Fish and Game 3298 Douglas Place Homer, AK 99603 mike.bye

Re: [R] Is R the right choice for simulating first passage times of random walks?

2011-07-27 Thread Mike Marchywka
Top posting cuz hotmail decided not to highlight... Personally I would tend to use java or c++ for the inner loops but you could of course later make an R package out of that. This is especially true if your code will be used elsewhere in a performance critical system. For example, I wrote som

Re: [R] Life Cycle Assessment with R.

2011-07-26 Thread Mike Marchywka
Date: Mon, 25 Jul 2011 19:03:08 +0100 From: jbustosm...@yahoo.es To: r-help@r-project.org Subject: [R] Life Cycle Assessment with R. Hello everyone, There's something really important about climate change and how many institutions around the globe a

Re: [R] Is there an R program that produces optimal solution/mix of multiple samples' varying volumes and values

2011-07-26 Thread Mike Marchywka
> Date: Mon, 25 Jul 2011 11:39:22 -0700 > From: lukescore...@gmail.com > To: r-help@r-project.org > Subject: [R] Is there an R program that produces optimal solution/mix of > multiple samples' varying volumes and values > > Sorry about the lengthy subj

Re: [R] xml2-config issues

2011-07-23 Thread Mike Marchywka
Date: Fri, 22 Jul 2011 20:06:34 -0600 From: abmathe...@gmail.com To: r-help@r-project.org Subject: [R] xml2-config issues I'm trying to install the XML package on Ubuntu 10.10, and I keep getting a warning message the XML could not be found an

Re: [R] Cox model approximaions (was "comparing SAS and R survival....)

2011-07-22 Thread Mike Marchywka
> From: thern...@mayo.edu > To: abouesl...@gmail.com > Date: Fri, 22 Jul 2011 07:04:15 -0500 > CC: r-help@r-project.org > Subject: Re: [R] Cox model approximaions (was "comparing SAS and R > survival) > > For time scale that are truly discret

Re: [R] Different result of multiple regression in R and SPSS

2011-07-19 Thread Mike Marchywka
> From: dwinsem...@comcast.net > To: seoulseoulse...@gmail.com > Date: Tue, 19 Jul 2011 18:45:47 -0400 > CC: r-help@r-project.org > Subject: Re: [R] Different result of multiple regression in R and SPSS > > > On Jul 19, 2011, at 6:29 PM, J. wrote: > > >

<    1   2   3   4   5   6   7   8   9   >