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 mea

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 b

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 is

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 me

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 want

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] wrote: > After copy and pasting the code for installation of glmmADMB package > suggested at http://glmmadmb.r-forge.r-projec

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 represen

[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 a

[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, l

[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

[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 policy

[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 n

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] 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") AdjClosePr

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 = "

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 y

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 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() function to > se

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] 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 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 pr

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

2011-12-06 Thread Ben Bolker
stat999 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 returns coe

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 environ

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-fe

[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: canno

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 w

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 y

[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 c

[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, dro

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] 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

[R] any R-Revolution users here? How to make Revolution portable?

2011-12-06 Thread Michael
How to make a portable version of Revolution R? I just wanted to be able to carry it anywhere I go in a USB drive... I don't need fancy functionalities, just need the visual debugger therein... btw, Windows or Linux doesn't matter... Any thoughts? Thanks a lot! [[alternative HTML versi

Re: [R] Change the limits of a plot "a posteriori"

2011-12-06 Thread Greg Snow
The zoomplot function in the TeachingDemos package can be used for this (it actually redoes the entire plot, but with new limits). This will generally work for a quick exploration, but for quality plots it is suggested to create the 1st plot with the correct range to begin with. -- Gregory (G

Re: [R] using StatEt IDE for Eclipse

2011-12-06 Thread Luke Miller
You will likely find more help on the StatEt mailing list, since the author of the package monitors it: http://lists.r-forge.r-project.org/mailman/listinfo/statet-user On Tue, Dec 6, 2011 at 4:04 PM, Matteo Richiardi wrote: > > Hi, > I'm trying to use StatEt IDE for Eclipse as my R editor, but

Re: [R] making changes to global variables in functions

2011-12-06 Thread R. Michael Weylandt
No pointer functionality in R (that I know of), but if you want to return two objects as one the standard way is to put them in a list and to return that list. Michael On Tue, Dec 6, 2011 at 2:35 PM, Yev wrote: > I'm trying to write a function that takes several objects with many > different att

[R] using StatEt IDE for Eclipse

2011-12-06 Thread Matteo Richiardi
Hi, I'm trying to use StatEt IDE for Eclipse as my R editor, but I'm completely lost. I've read all I could find online, made apparently all I had to do (installing rj, configuraing StatEt, etc.) but still cannot make R running. Below is the error log file. Thank you so much for assistance. Matteo

Re: [R] varaince explined of a regression tree using ctree

2011-12-06 Thread Patrick Breheny
On 12/06/2011 03:05 PM, Antonio Punzon Merino wrote: I would like know the way to calculate the variance explained of a regression tree. I use the function "ctree" from library "party" ctree does not provide this information by default, but it is not difficult to calculate: X <- matrix(rnorm

Re: [R] help wrapping findInterval into a function

2011-12-06 Thread William Dunlap
No, the problem is not with "with" but is that the OP's did not return the modified data.frame. He didn't show how the function was called, but I suspect the usage was like f0 <- function() globalDataFrame$newCol <- ... f0() where it should have been f1 <- function(dataFrame) { dataFrame

Re: [R] Writing out in loops

2011-12-06 Thread Thomas
Thanks for the reply. I'm writing data out as it is generated into a number of different files and not saving it as I go (although I could - not sure which would be quicker). In fact I tried this today and the approach with the loop seems to run reasonably fast. Thomas On 6 Dec 2011, at 15:07

[R] making changes to global variables in functions

2011-12-06 Thread Yev
I'm trying to write a function that takes several objects with many different attributes and then changes their attributes. So what I wanted to happen in the simplified example below is for the function to change the attributes of the objects state1 and state2 that are passed to it. But because sta

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

2011-12-06 Thread ROLL Josh F
Thank for the links. I reread one I found yesterday about changing the options parameter to options(warn = 2) and that allows the try() function to see a warning the same way as an error so problem solved using the existing code. Cheers, Josh -Original Message- From: William Dunl

Re: [R] RStudio: copied line is always not the same as the line that I highlighted

2011-12-06 Thread Jeff Newmiller
RStudio is not R. Go ask the RStudio support people at www.rstudio.org. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

[R] varaince explined of a regression tree using ctree

2011-12-06 Thread Antonio Punzon Merino
Dear, I would like know the way to calculate the variance explained of a regression tree. I use the function "ctree" from library "party" many thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.c

Re: [R] help wrapping findInterval into a function

2011-12-06 Thread David Winsemius
On Dec 6, 2011, at 11:43 AM, Steve E. wrote: Dear R Community, I hope you might be able to assist with a small problem creating a function. I am working with water-quality data sets that contain the concentration of many different elements in water samples. I need to assign quality- cont

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

2011-12-06 Thread William Dunlap
Or, Google for 'R catching warnings' and third entry is the excellent http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/ Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On

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

2011-12-06 Thread William Dunlap
Look at the archives of this mailing list for a discussion entitled 'Stack trace?' on Nov 9-10 of this year. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Gene Leynes

Re: [R] Sequential Sum in R

2011-12-06 Thread Jean V Adams
vioravis wrote on 12/06/2011 12:42:35 PM: > I am trying to code the following excel formula in R. > > ab cResultFormula > 1 10 0.1 #N/A > IF(B2<20,NA(),C2+IF(ISERROR(D1),0,D1)) > 2 20 0.2 0.2 > IF(B3<20,NA

Re: [R] read.table performance

2011-12-06 Thread Gabor Grothendieck
On Tue, Dec 6, 2011 at 1:15 PM, Gene Leynes wrote: > ** Disclaimer: I'm looking for general suggestions ** > I'm sorry, but can't send out the file I'm using, so there is no > reproducible example. > > I'm using read.table and it's taking over 30 seconds to read a tiny file. > The strange thing is

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

2011-12-06 Thread Gene Leynes
I've had the same problem in other cases. Does anyone know how to catch warnings as well as errors? On Tue, Dec 6, 2011 at 12:34 PM, ROLL Josh F wrote: > ** > Agreed. But what I am trying to control is when I get a warning. I want > to do something different if a warning OR an error pop up?

[R] Sequential Sum in R

2011-12-06 Thread vioravis
I am trying to code the following excel formula in R. ab cResultFormula 1 10 0.1 #N/A IF(B2<20,NA(),C2+IF(ISERROR(D1),0,D1)) 2 20 0.2 0.2 IF(B3<20,NA(),C3+IF(ISERROR(D2),0,D2)) 3 30

Re: [R] split date nad time

2011-12-06 Thread R. Michael Weylandt
I can't replicate this: does it occur in a fresh R session (no GUI, just straight --vanilla)? If so, sessionInfo()? On Tue, Dec 6, 2011 at 11:23 AM, threshold wrote: > > ok, > >> dput(AggDateTime[960:962]) > structure(c(1314313140L, 1314313200L, 1314313260L), class = c("POSIXct", > "POSIXt"), tzo

Re: [R] convert p-values into z-scores

2011-12-06 Thread Jean V Adams
Try this: pval <- 0.05 qnorm(1 - (pval/2)) Jean Amidou N'Diaye wrote on 12/06/2011 12:27:25 PM: > Is there a program to convert p-values into z-scores for meta-analysis > purpose? Thanks [[alternative HTML version deleted]] __ R-help@r-pro

Re: [R] Find x value of density plots

2011-12-06 Thread Duncan Murdoch
On 06/12/2011 1:42 PM, Pavan G wrote: Hello All, How do I find the x value at max density for say, this plot plot(density(rnorm(1000))) d <- density(rnorm(1000)) plot(d) abline(v=d$x[which.max(d$y)]) Duncan Murdoch __ R-help@r-project.org mailing

Re: [R] Find x value of density plots

2011-12-06 Thread Bert Gunter
?density ... and pay attention to the "Value" details. -- Bert On Tue, Dec 6, 2011 at 10:42 AM, Pavan G wrote: > Hello All, > > How do I find the x value at max density for say, this plot > plot(density(rnorm(1000))) > > > Thank you, > P > >        [[alternative HTML version deleted]] > > __

Re: [R] How to de-source and re-source a file?

2011-12-06 Thread Michael
the problem with restarting R is that I then have to re-execute the program until the point where I wanted to debug, which is a very long-waiting time... On Tue, Dec 6, 2011 at 12:17 PM, Duncan Murdoch wrote: > On 06/12/2011 1:10 PM, Michael wrote: > >> i.e. how to make sure the function that wa

[R] Find x value of density plots

2011-12-06 Thread Pavan G
Hello All, How do I find the x value at max density for say, this plot plot(density(rnorm(1000))) Thank you, P [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

[R] read.table performance

2011-12-06 Thread Gene Leynes
** Disclaimer: I'm looking for general suggestions ** I'm sorry, but can't send out the file I'm using, so there is no reproducible example. I'm using read.table and it's taking over 30 seconds to read a tiny file. The strange thing is that it takes roughly the same amount of time if the file is 1

[R] convert p-values into z-scores

2011-12-06 Thread Amidou N'Diaye
Is there a program to convert p-values into z-scores for meta-analysis purpose? Thanks __ 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 pr

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

2011-12-06 Thread Gene Leynes
I think the problem is that it's only a warning and not an error. result_<-list() for(i in 1:10){ if(inherits(try(sqrt(9-i),silent=TRUE),"try-error")){ #If sqrt fails cat('fail',i,'\n') result_[[i]]<-0 } else { #If sqrt succeeds cat('succeed',i,'\n') result_[[i]]

Re: [R] help! "browser()" does not get stopped...

2011-12-06 Thread Duncan Murdoch
On 06/12/2011 1:17 PM, Michael wrote: Thanks a lot! What I was wondering is: if we use "find", are the results for locally installed packages, or "search_paths", or the functions that are loaded into memory? It finds what get() would find, so that starts with the current evaluation frame, an

Re: [R] How to de-source and re-source a file?

2011-12-06 Thread Duncan Murdoch
On 06/12/2011 1:19 PM, Michael wrote: Thanks a lot! But how about removing "all the functions" in the whole "myprogram1.R" source file? There's no way for R to know what you did with those functions, so no general way to do that. But if you just source it again, it will overwrite the ones i

Re: [R] How to de-source and re-source a file?

2011-12-06 Thread Michael
Thanks a lot! But how about removing "all the functions" in the whole "myprogram1.R" source file? The reason for asking this is of course, after I made some changes, I saved it, and then I wanted the functions to be reloaded into memory so that I can do "mtrace", or "browser" etc. Thank you! On

Re: [R] help! "browser()" does not get stopped...

2011-12-06 Thread Michael
Thanks a lot! What I was wondering is: if we use "find", are the results for locally installed packages, or "search_paths", or the functions that are loaded into memory? I am looking for some command to tell me which functions are currently in the memory. My understanding is that after the firs

Re: [R] How to de-source and re-source a file?

2011-12-06 Thread Duncan Murdoch
On 06/12/2011 1:10 PM, Michael wrote: i.e. how to make sure the function that was loaded into workspace/memory is the version that I edited latest... not some stale version... This might solve some of my breakpoint and browser/debug problem, even the RStudio problem that I've met You can u

[R] How to de-source and re-source a file?

2011-12-06 Thread Michael
i.e. how to make sure the function that was loaded into workspace/memory is the version that I edited latest... not some stale version... This might solve some of my breakpoint and browser/debug problem, even the RStudio problem that I've met thanks a lot! [[alternative HTML version

[R] RStudio: copied line is always not the same as the line that I highlighted

2011-12-06 Thread Michael
Hi all, I am using RStudio. I wanted to copy and past an expression/line. I highlighted it, and then copied and pasted: The result was not the line that I wanted, instead, it was the line above... For example: I have three lines: a b c I highlighted "b" and copied, but

Re: [R] help! "browser()" does not get stopped...

2011-12-06 Thread Duncan Murdoch
On 06/12/2011 12:45 PM, Michael wrote: yeah, any one line command of checking which function is currently in the memory? As Uwe said, that's not a very useful thing to do. But if you know the name you're looking for, find() is useful. For example, Browse[1]> find("mean") [1] "package:base

Re: [R] help! "browser()" does not get stopped...

2011-12-06 Thread Uwe Ligges
On 06.12.2011 18:45, Michael wrote: yeah, any one line command of checking which function is currently in the memory? Which memory? You have to think about namespaces and environments in such a case, and then, we need to know what you are actually doing. so if I find any function not in

Re: [R] help! "browser()" does not get stopped...

2011-12-06 Thread Michael
yeah, any one line command of checking which function is currently in the memory? so if I find any function not in the .GlobalEnv. then I know what the problem is? 2011/12/6 Uwe Ligges > > > On 06.12.2011 18:29, Michael wrote: > >> how do I check and make sure? thx >> > > E.g. insert cat("Hello

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

2011-12-06 Thread LCOG1
So after about 4 hours struggling with Try and TryCatch I am throwing in the towel. I have a more complicated function that used logspline through iterative distributions and at some point the logspline doesnt function correctly for some subsets but is fine with others so I need to be able to iden

Re: [R] Can't load package 'lars'

2011-12-06 Thread Luc Villandre
Hello, I do think so. ### [villandre@stat04 lars]$ pwd /home/villandre/R/x86_64-redhat-linux-gnu-library/2.11/lars [villandre@stat04 lars]$ ls data DESCRIPTION help html INDEX libs Meta NAMESPACE R ### I re-installed it and I still get the same error message. > install.packages("l

[R] Bootstrapping

2011-12-06 Thread Bastian Offermann
Hello, I am having some trouble setting up a bootstrapping prodecure. I create artificial data and would like to use these to bootstrap a t-test statistic from these. Especially I do not really get how boot uses the indices variable or i variable. Can anybody help out? Thanks!! b0 <- 1/2

Re: [R] axis thickness in plot()

2011-12-06 Thread Peter Ehlers
On 2011-12-06 08:35, AlexC wrote: Hello, I am trying to increase the thickness of the axis in plot() without reverting to the use of paint programs i see posts on that topic for the xyplot function but want to see if i can do it with plot() because i've already setup my graph script using that

Re: [R] help! what's wrong with setBreakpoint

2011-12-06 Thread Duncan Murdoch
On 06/12/2011 11:11 AM, Michael wrote: I am not sure... How do I make sure about that? esp " Are you sure you were executing the same function after you hit c?"? From a later one of your messages (adding a call to browser() didn't do anything), I think you weren't. Now you know how to check

Re: [R] Can't load package 'lars'

2011-12-06 Thread Uwe Ligges
On 06.12.2011 18:27, Luc Villandre wrote: Hello, I do think so. ### [villandre@stat04 lars]$ pwd /home/villandre/R/x86_64-redhat-linux-gnu-library/2.11/lars [villandre@stat04 lars]$ ls data DESCRIPTION help html INDEX libs Meta NAMESPACE R ### I re-installed it and I still get the sa

Re: [R] help! "browser()" does not get stopped...

2011-12-06 Thread Uwe Ligges
On 06.12.2011 18:06, Michael wrote: It's weird! I am sure that I have inserted "browser()" in a sub-routine where I wanted to stop and debug... But when I start running the main function from the separate main file, it doesn't stop within the target sub-routine at all. Probably you are usi

[R] help! "browser()" does not get stopped...

2011-12-06 Thread Michael
It's weird! I am sure that I have inserted "browser()" in a sub-routine where I wanted to stop and debug... But when I start running the main function from the separate main file, it doesn't stop within the target sub-routine at all. Please help me! Thanks! ___

Re: [R] About summary in linear models

2011-12-06 Thread John C Frain
Your email has become a bit distorted during transmission. If you have used the summary command you should be getting some more summary statistics. The lm function in R returns an object of class "lm" which is a list containing at least the components listed in the help files for lm. The objects

[R] help wrapping findInterval into a function

2011-12-06 Thread Steve E.
Dear R Community, I hope you might be able to assist with a small problem creating a function. I am working with water-quality data sets that contain the concentration of many different elements in water samples. I need to assign quality-control flags to values that fall into various concentrati

Re: [R] split date nad time

2011-12-06 Thread threshold
ok, > dput(AggDateTime[960:962]) structure(c(1314313140L, 1314313200L, 1314313260L), class = c("POSIXct", "POSIXt"), tzone = "") -- View this message in context: http://r.789695.n4.nabble.com/split-date-nad-time-tp4164191p4165378.html Sent from the R help mailing list archive at Nabble.com.

[R] axis thickness in plot()

2011-12-06 Thread AlexC
Hello, I am trying to increase the thickness of the axis in plot() without reverting to the use of paint programs i see posts on that topic for the xyplot function but want to see if i can do it with plot() because i've already setup my graph script using that i thought i could use axis() funct

[R] mfp package - can I exclude some powers?

2011-12-06 Thread Eleni Rapsomaniki
Hi, The mfp package suggests fractional polynomial transformations for non-linear predictors. For continuous variables that take negative values the suggested transformations tend to look ugly, e.g. if x1 is the original variable it is transformed to something like: (x1+5.67)^1 * log(x1+5.67), whe

Re: [R] split date nad time

2011-12-06 Thread David Winsemius
On Dec 6, 2011, at 5:38 AM, threshold wrote: Dear R Users, given that: AggDateTime[960:962] [1] "2011-08-25 23:59:00 BST" "2011-08-26 00:00:00 BST" [3] "2011-08-26 00:01:00 BST" unlist(strsplit(as.character(AggDateTime[960])," ", fixed=TRUE)) [1] "2011-08-25" "23:59:00" unlist(strsplit

Re: [R] help! what's wrong with setBreakpoint

2011-12-06 Thread Michael
I am not sure... How do I make sure about that? esp " Are you sure you were executing the same function after you hit c?"? Thanks again! On Tue, Dec 6, 2011 at 8:57 AM, Duncan Murdoch wrote: > On 06/12/2011 9:47 AM, Michael wrote: > >> It printed: >> >> c:\R\myproject1\myfile.R#38: >> myfunc1

Re: [R] Argument validation within functions

2011-12-06 Thread Bert Gunter
On Tue, Dec 6, 2011 at 7:15 AM, Johannes Radinger wrote: > Thank you, i didn't know that the !operator is > also working for is.numeric etc. Read (more carefully?) R docs, please. ! is a unary function that takes a logical argument(and will coerce to logical nonlogical arguments if it can); is.nu

[R] About summary in linear models

2011-12-06 Thread Otto F. Wagner
Hello!!, for linear models fit I use Gretl, but now I'm starting to use R, I would like to know if is there some function to obtain a extended summary like in Gretl. I will write a example in Gretl Modelo 1: MCO, usando las observaciones 1968-1982 (T = 15) Variable dependiente: Invest Coefici

Re: [R] Argument validation within functions

2011-12-06 Thread Enrico Schumann
you may be looking for ?missing f <- function(a,b) { if (missing(b)) print("b is missing") } f(a=1, b=2) f(a=1) f(b=2) Regards, Enrico Am 06.12.2011 16:15, schrieb Johannes Radinger: Thank you, i didn't know that the !operator is also working for is.numeric etc. Anyway I want to test if

Re: [R] Problem in while loop

2011-12-06 Thread Gyanendra Pokharel
Yes Michael, it works well and I got the result what I want but it totally depends on how reliable result do I want. When I take very high rho (near about 1) and very low psi, it takes very long time may be it gives us more accurate result. But for lower rho and higher psi, it gives immediately, an

Re: [R] Argument validation within functions

2011-12-06 Thread Berwin A Turlach
G'day Johannes, On Tue, 06 Dec 2011 16:15:21 +0100 "Johannes Radinger" wrote: > Thank you, i didn't know that the !operator is > also working for is.numeric etc. > > Anyway I want to test if an argument is set in the > function call and if not a code is executed... So > far I tried: > > f <-f

Re: [R] Argument validation within functions

2011-12-06 Thread Johannes Radinger
Thank you, i didn't know that the !operator is also working for is.numeric etc. Anyway I want to test if an argument is set in the function call and if not a code is executed... So far I tried: f <-function(a,b){ if(!exists("b")) print("exists: b is not set") if(is.null("b")) pri

Re: [R] How to automate the detection of break points for use in cut

2011-12-06 Thread Sébastien Bihorel
I forgot to post my reply to Duncan's response on the list. On Tue, Dec 6, 2011 at 7:56 AM, Sébastien Bihorel wrote: > Thanks for the link Duncan, > > Given the number of methods and links listed in the Cluster task view, > things are looking a bit more complex than I thought... I'll have to rea

Re: [R] Writing out in loops

2011-12-06 Thread Sarah Goslee
Is there some reason you can't create the entire file in R and then write it out in a single step? It looks like you're writing out mat[1, 1:10] so you could just use write.table(mat[1, 1:10], filen) Can you expand on what you're trying to do? Sarah On Tue, Dec 6, 2011 at 4:18 AM, Thomas wrote

Re: [R] a question on autocorrelation acf

2011-12-06 Thread Bazman76
http://r.789695.n4.nabble.com/file/n4164630/R_example.xlsx R_example.xlsx Hi there, I attach an excel file which I use to produce the data. It simulates a simple AR(1) process y_t=0.5y_{t-1}+z_t. In column E I have cut and paste values so that we can compare like with like. When I run the ac

[R] HTML Forms to R

2011-12-06 Thread vioravis
I have currently a R function that reads a csv file, does some computations, produces some plots and writes a csv file as output. I would like to use HTML forms to make a user interface for calling appropriate parts of the functions (reading csv file, doing computations, displaying plots and writin

[R] [R-pkgs] pls 2.3.0 released

2011-12-06 Thread Bjørn-Helge Mevik
Version 2.3.0 of the pls package has been released. The pls package implements Partial Least Squares Regression and Principal Component Regression. The major changes are: - New analysis method Canonical Powered PLS (CPPLS) implmemented. See ?cppls.fit. - coefplot() can now plot whiskers at +

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

2011-12-06 Thread stat999
Hi, I am a quite beginner of random effect modelling. Sorry for my ignorant question. My question is about the values of lme function. It returns coefficients which is a list with two components. The R-help file says that it returns the estimated random effects for each level of grouping. What is

Re: [R] LaTeX output for summary.lm object - while displaying the information outside the table

2011-12-06 Thread jose Bartolomei
Hi,Yes, you can use all values within the object For example, data(airquality) obj.lm <- summary(lm(Temp~Ozone, airquality)) names(obj.lm) [1] "call" "terms" "residuals" "coefficients" "aliased" "sigma" [7] "df""r.squared" "adj.r.squared" "fs

[R] MAC Problem with http in R while not problem on Win machine

2011-12-06 Thread Martin Bauer
Hello, thanks to (http://timelyportfolio.blogspot.com/) and also (http://systematicinvestor.wordpress.com) the following code was published and it is running smoothly on my Windows enviroment but it is failing to perform on my MAC. #get MAImp code from GIST #thanks to http://systematicinvestor

[R] split date nad time

2011-12-06 Thread threshold
Dear R Users, given that: > AggDateTime[960:962] [1] "2011-08-25 23:59:00 BST" "2011-08-26 00:00:00 BST" [3] "2011-08-26 00:01:00 BST" > unlist(strsplit(as.character(AggDateTime[960])," ", fixed=TRUE)) [1] "2011-08-25" "23:59:00" > unlist(strsplit(as.character(AggDateTime[962])," ", fixed=TRU

[R] Writing out in loops

2011-12-06 Thread Thomas
I would like to write some data to different files. I can create the filename Day1.txt like this: filen <- paste("Day", l, ".txt", sep="") and then I'm using a For loop to write out one row of a matrix, something like this: For (j in 1:10) { cat(mat[1,j], ",", file=filen, append=TRUE) } ca

[R] Read Windows BMP format images

2011-12-06 Thread Dr Gregory Jefferis
Hello, Does anyone know of an R package that can read Windows BMP format images? Many thanks, Greg Jefferis. -- Gregory Jefferis, PhD Division of Neurobiology MRC Laboratory of Molecular Biology, Hills Road, Cambridg

  1   2   >