[R] R 2.14 png X11

2011-12-06 Thread M. Emily Merrill
Dear R-Help, On a new server (Ubuntu 10.04.1/Lucid), with R2.14.0, I am trying to create a heatmap using a script that works fine elsewhere (R2.12 on a different Ubuntu server). The script halts when calling png, Error in X11...unable to start device PNG (full error message and session info at

Re: [R] read.table performance

2011-12-06 Thread Gene Leynes
Mark, Thanks for your suggestions. That's a good idea about the NULL columns; I didn't think of that. Surprisingly, it didn't have any effect on the time. This problem was just a curiosity, I already did the import using Excel and VBA. I was just going to illustrate the power and simplicity of

[R] SVM - predict function error handling

2011-12-06 Thread saveetha
All, I am beginner in R here.I am working on SVM and am getting the below errors wheneverI call the predict function.I have tried reading the manual for predict() butI  am totally stumped and not able to move further. pred - predict(model, Test[,-1])Error in scale(newdata[, object$scaled, drop

[R] configuring a package for own personal needs

2011-12-06 Thread Sachinthaka Abeywardana
Hi All, There is a function in package R2Cuba called Cuhre that I need to use. It keeps spitting out a new-line which I really dont want it to do. So I was wondering what is the best way of configuring the package. I tried copying and pasting the code into Cuhre2 and getting rid of the newline

Re: [R] Problem in while loop

2011-12-06 Thread R. Michael Weylandt
You want a plot of s = sum(log(b^2 + (x-a)^2)) as a function of a or am I missing something? You do it just like any other R plot: pick some values of a, evaluate s for each of them (a little tricky if you use my vectorized version due to the implicit use of the recycling rule but very easy with

Re: [R] configuring a package for own personal needs

2011-12-06 Thread R. Michael Weylandt
The easiest thing is probably to download source files from CRAN and edit the R code, which can be found in the R2Cuba_vvv/R/ directory (vvv is the version code), re-build and then you should be good permanently. I just looked at the source on my machine: very easily done, if you feel comfortable

[R] import a dataset from Access database into R

2011-12-06 Thread Ying Zhou
Hi I was trying to import a dataset from access database into R My code looks like below library(RODBC) setwd(//STATESFPSOP1/docs/CRMPO/DEPT/Retail PD) channel-odbcConnectAccess(MortgagePD.mdb) Mdata-sqlFetch(channel, MortgagePD) But I got error messages saying Error: cannot allocate

Re: [R] configuring a package for own personal needs

2011-12-06 Thread jim holtman
Where is it spitting out the new-line to? Can you just capture the output and then remove the last new-line; easier than rewriting the function. Here is one way of doing it: f.x - function()cat('this is\n\n output\n with\n an extra linefeed at the end\n\n') f.x() # has the extra line-feed

Re: [R] import a dataset from Access database into R

2011-12-06 Thread jim holtman
Yo need to provide a lot more information. For example, how large is the dataset you are trying to read (how many row/columns). I assume that you are running under Windows probably with a 32-bit version of R, but who knows. How big are the rest of the objects that you have in your global

Re: [R] the estimated random effects for each level of grouping

2011-12-06 Thread Ben Bolker
stat999 yumik091186 at gmail.com writes: Hi, I am a quite beginner of random effect modelling. Sorry for my ignorant question. No problem, but this question is more appropriate for the r-sig-mixed-mod...@r-project.org mailing list ... My question is about the values of lme function. It

Re: [R] configuring a package for own personal needs

2011-12-06 Thread Sachinthaka Abeywardana
Hi Michael/ everyone, I guess a big part of the question was also how would you compile (remember that some of the code is written in C)? Any recommended tutorials on this? Sachin On Wed, Dec 7, 2011 at 11:16 AM, R. Michael Weylandt michael.weyla...@gmail.com wrote: The easiest thing is

Re: [R] Problem in while loop

2011-12-06 Thread Gyanendra Pokharel
Thanks Michael, I am able to find the very nice plot of the function we discussed but still have the problem of ploting the function loglikelihood(aout,bout) versus aout posted in the initial massage. Best On Tue, Dec 6, 2011 at 10:40 AM, Gyanendra Pokharel gyanendra.pokha...@gmail.com wrote:

Re: [R] configuring a package for own personal needs

2011-12-06 Thread Jeff Newmiller
RTFM. (Writing R Extensions. It comes with R.) Since you are asking this question I will hazard a guess that you are on Windows, and will want to install RTools per that documentation. --- Jeff Newmiller

Re: [R] To Try or to TryCatch, I have tried to long

2011-12-06 Thread R. Michael Weylandt
This also might be of help: http://mazamascience.com/WorkingWithData/?p=912 Michael On Tue, Dec 6, 2011 at 3:02 PM, ROLL Josh F jr...@lcog.org wrote:  Thank for the links.  I reread one I found yesterday about changing the options parameter to options(warn = 2) and that allows the try()

Re: [R] Problem in while loop

2011-12-06 Thread R. Michael Weylandt
I'm not here to walk you through learning how to plot: but once again does this work? curve(loglikelihood(x, bout = 0.1)) If you want to plot a function of two independent variables, you'll have to look into the various ways of doing so. Please do read section 12 of An Introduction to R which

Re: [R] Plotting Time Series Data by Month

2011-12-06 Thread R. Michael Weylandt
Your data set is not reproducible from an image (use dput() on your next post to give us a taste of your data) but I'll hazard it's a ts class object. If so, try this: X - ts( sample(500, 204), frequency = 12, start = 1995) plot( rep(1:12, 17), X, col = rep(1:17, each = 12), xaxt = n, xlab =

[R] scatterplotting stock returns using quantmod and pairs()

2011-12-06 Thread alan lapedes
I want to get data for a set of ticker symbols and compute the daily return of the adjusted close using quantmod, and then scatterplot returns using pairs(). The following gets data for the list of tickers: tickers - c(SHY,TLT,SPY,IWM,GLD,IEV,ILF,EWJ,EPP,SAF,ASA) AdjClosePrices - do.call(merge,

Re: [R] help wrapping findInterval into a function

2011-12-06 Thread Steve E.
Bill (and David), Thank you very much for taking the time to respond to my query. You were right, I was creating and calling the function exactly as you had predicted. I revised the structure based on your suggestion. It runs but the output is an array of the flags that are not attached to the

[R] How to fit the log Gaussian Cox process model

2011-12-06 Thread JosephWang
Hi, As far as I know, there exist some programs via the function INLA, but I'm so curious if there is a specific function directly used to fit the log Gaussian Cox process model and predict the latent Gaussian field. That is, if I have a data points, then I input it in the function and don't

[R] Trouble with mlogit.data

2011-12-06 Thread ablankertz
I've got data in the form of rec policyno reason2 uwclass sexx term band 11 17B356313 IS SM 302 22 17B356326 IS PM 203 when I use mydata-mlogit.data(poldata, choice=reason2, shape = wide, reflevel=IS) the result is rec policyno

[R] Rank samples by breaks in hist and assign result as factor

2011-12-06 Thread Frostygoat
Hi R users, My goal is to rank my samples according to how they fall out in a histogram with 10 bins to produce a ranking for each sample according to where it falls on the histogram, with a 1 to represent one tail of the hist, a 10 to represent the other tail, and a 5 for the median/mean. I have

[R] glmmADMB not available on r-forge?

2011-12-06 Thread Messmer,Dave [Sas]
After copy and pasting the code for installation of glmmADMB package suggested at http://glmmadmb.r-forge.r-project.org/, I receive this message. install.packages(glmmADMB, repos=http://r-forge.r-project.org,type=source;) Warning message: In getDependencies(pkgs, dependencies, available, lib) :

[R] questions about scatterplotMatrix

2011-12-06 Thread Wendy
Hi all, I want to plot some data with scatterplotMatrix. I want to set all axis limits of all the sub figures the same, also add abline(0,1) to all the sub figures. Using the code following code, I can only add abline to the first off-diagonal figure, and I did not figure out how to set all the

Re: [R] Rank samples by breaks in hist and assign result as factor

2011-12-06 Thread David Winsemius
On Dec 6, 2011, at 7:25 PM, Frostygoat wrote: Hi R users, My goal is to rank my samples according to how they fall out in a histogram with 10 bins to produce a ranking for each sample according to where it falls on the histogram, with a 1 to represent one tail of the hist, a 10 to represent

Re: [R] glmmADMB not available on r-forge?

2011-12-06 Thread Joshua Wiley
Hi Dave, You should be okay if you update to a recent version of R, so in a way, yes, it is temporary :) Cheers, Josh On Tue, Dec 6, 2011 at 4:46 PM, Messmer,Dave [Sas] dave.mess...@ec.gc.ca wrote: After copy and pasting the code for installation of glmmADMB package suggested at

Re: [R] configuring a package for own personal needs

2011-12-06 Thread David Winsemius
On Dec 6, 2011, at 10:22 PM, Jeff Newmiller wrote: RTFM. (Writing R Extensions. It comes with R.) Since you are asking this question I will hazard a guess that you are on Windows, and will want to install RTools per that documentation. In addition to ReadingThatF'ingManl, you may also

Re: [R] glmmADMB not available on r-forge?

2011-12-06 Thread David Winsemius
On Dec 6, 2011, at 7:46 PM, Messmer,Dave [Sas] wrote: After copy and pasting the code for installation of glmmADMB package suggested at http://glmmadmb.r-forge.r-project.org/, I receive this message. install.packages(glmmADMB, repos=http://r-forge.r-project.org,type=source;) Warning

Re: [R] help wrapping findInterval into a function

2011-12-06 Thread David Winsemius
On Dec 6, 2011, at 5:53 PM, Steve E. wrote: Bill (and David), Thank you very much for taking the time to respond to my query. You were right, I was creating and calling the function exactly as you had predicted. I revised the structure based on your suggestion. It runs but the output

Re: [R] read.table performance

2011-12-06 Thread peter dalgaard
On Dec 6, 2011, at 22:33 , Gene Leynes wrote: Mark, Thanks for your suggestions. That's a good idea about the NULL columns; I didn't think of that. Surprisingly, it didn't have any effect on the time. Hmm, I think you want character and NULL there (i.e., quoted). Did you fix both?

Re: [R] How to fit the log Gaussian Cox process model

2011-12-06 Thread Rolf Turner
If I understand your question correctly, the functions lgcp.estK() and lgcp.estpcf() in the spatstat package should help you to fit the model. (These functions use the method of minimum contrast.) I don't know about predicting the underlying random field. This is random, with a constant mean

<    1   2