Re: [R] image.plot adding x-axis labels. Please Help

2012-04-04 Thread David Lyon
Sorry that didnt work for me, any ideas? - Original Message - From: ilai ke...@math.montana.edu To: David Lyon david_ly...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Sent: Tuesday, April 3, 2012 10:43 PM Subject: Re: [R] image.plot adding x-axis labels. Please Help On Tue,

[R] Trying to merge new data set to bottom of old data set. Both are zoo objects.

2012-04-04 Thread knavero
Here is the data I'm working with: http://r.789695.n4.nabble.com/file/n4530888/new.txt new.txt http://r.789695.n4.nabble.com/file/n4530888/old.txt old.txt My code is here: http://pastebin.com/9jjs6Ahr I'm looking for away to simply attach the new.txt to the bottom of old.txt through R, else

Re: [R] Trying to merge new data set to bottom of old data set. Both are zoo objects.

2012-04-04 Thread knavero
Here's a case where it doesn't work. Again, the problem is that when I use the rbind or concatenate functions, the 2012 data set seems to go ahead of the 2010 and 2011 portions of the data set. The problem seems dependent on the text files I read in:

Re: [R] Grouping and/or splitting

2012-04-04 Thread Berend Hasselman
On 04-04-2012, at 07:15, Ashish Agarwal wrote: Yes. I was missing the DROP argument. But now the problem is splitting is causing some weird ordering of groups. Why weird? See below: DF - read.table(text= Houseid,Personid,Tripid,taz 1,1,1,4 1,1,2,7 2,1,1,96 2,1,2,4 2,1,3,2 2,2,1,58

[R] multivariate ordered probit regression---use standard bivariate normal distribution?

2012-04-04 Thread Trey Batey
Hello. I have yet to receive a response to my previous post, so I may have done a poor job asking the question. So, here is the general question: how can I run a run a multivariate (more than one non-independent, response variables) ordered probit regression model? I've had success doing this in

Re: [R] Grouping and/or splitting

2012-04-04 Thread Ashish Agarwal
Thanks a ton! It was weird because according to me ordering should have by default. Anyways, your workaround along with Weidong's method are both good solutions. On Wed, Apr 4, 2012 at 12:10 PM, Berend Hasselman b...@xs4all.nl wrote: On 04-04-2012, at 07:15, Ashish Agarwal wrote: Yes. I was

Re: [R] filling small gaps of N/A

2012-04-04 Thread Petr PIKAL
Michael, First of all, thank you very much for your answer. I've read your 2 answers, but I'm not really sure that they corresponds to my problem of NAs. You shall read answers more carefully x-rnorm(20) x[3:4]-NA x[12:19]-NA x [1] -0.30754528 0.07597988 NA NA

[R] Odp: identify time span in date vector

2012-04-04 Thread Petr PIKAL
Hi Can you please be more specific? Based on this input, what do you want as a result? set.seed(111) dates = as.Date(sort(rnorm(10,3000,100)), origin = 2000-1-1) dates [1] 2007-08-01 2007-10-21 2007-12-08 2007-12-15 2008-01-29 2008-02-14 2008-02-16 2008-03-01 [9] 2008-04-02 2008-04-11

Re: [R] filling small gaps of N/A

2012-04-04 Thread jeff6868
Wow, thank you for all your answers. You were completely right michael. Well, it's my fault. I didn't understood your 2nd reply, when you were talking about arguments for larger gaps. I thought it was for deleting big gaps too. I apologize. It was too easy in fact. I also didn't noticed the

Re: [R] Trying to merge new data set to bottom of old data set. Both are zoo objects.

2012-04-04 Thread Ashish Agarwal
It is unclear what the problem is. Does following code solve your append problem? fmt = %m/%d/%Y %H:%M fname - new.txt #records = 2904 newfile - read.csv(fname, header = TRUE, sep = ,, skip=0, colClasses = c(rep(character,2), rep(numeric, 16)) ) newfile.comb - cbind(newfile[2], newfile[3]) fname

[R] [R-pkgs] New package IC2

2012-04-04 Thread PLAT didier
Dear all, A new package 'IC2' is now available. IC2 computes some indices of inequality and concentration (SGini, Atkinson, GEI). For each index, it provides decomposition between subgroups. Plotting of Lorenz and concentration curves are also available. Sampling weights can be used. Regards,

Re: [R] identify time span in date vector

2012-04-04 Thread Fischer, Felix
Dear Petr, thanks for taking your time. For this input, the first element should be selected since there are more than 3 more dates within one year (basically, all other dates are within one year) and at least one of them is more than 3 month later. In the meantime, I came up with some code

[R] read.socket utils package : somthing is going wrong

2012-04-04 Thread msalese
Hi everyone, I'd appreciate if someone could help me to understand what is happening. I'm attempting to connect R to the broker platform using tcp on localhost 5333. Just to learn how use make.socket, write.socket, ..functions I wrote simple code: #prepare string command to subscribe ask and

Re: [R] identify time span in date vector

2012-04-04 Thread Fischer, Felix
Dear David, thanks for your suggestion. However, when applied to dates = as.Date(c(2001-1-1, 2001-1-3, 2001-1-12, 2001-1-13, 2001-4-20)) it doesn't behave like i want... which( dates[4:(length(dates))] -dates[1:(length(dates)-3)] 365 dates[3:(length(dates)-1)]

Re: [R] Perspective Plot, and npreg

2012-04-04 Thread Duncan Murdoch
On 12-04-03 4:35 PM, dnewbold wrote: Hi, Im doing a simple non parametric regression using two variables(ie regressing one on the the other), how would I counstruct my persp plot for it with there only be two variables in total, . Any help would be much appreciated. You can't. persp() plots

Re: [R] how to load functions from file

2012-04-04 Thread Rolf Turner
On 04/04/12 15:54, John Kohr wrote: Hello, I have several functions in an .R file. I try to load them with load() command but it seems is not working.. if .R is in /home/user/myfunctions.R how can i load it? is there any other way? Don't assume that you know what load means on the basis of

Re: [R] how to load functions from file

2012-04-04 Thread Bert Gunter
Rolf: Google on load functions into R. A post referencing source() (from Henrik Bengtsson is the first hit. -- Bert On Wed, Apr 4, 2012 at 3:23 AM, Rolf Turner rolf.tur...@xtra.co.nz wrote: On 04/04/12 15:54, John Kohr wrote: Hello, I have several functions in an .R file. I try to load

Re: [R] Constructing Distance matrix for hclust

2012-04-04 Thread Alekseiy Beloshitskiy
Hi, Vinod, Hope this will help you: library(RJDBC) #specify your mysql driver drv - JDBC(com.vertica.Driver, ../vertica_3.5_jdk_5.jar) # specify your connection string conn - dbConnect(drv, jdbc:postgres://IP:port/dbname, login, password) #list tables dbListTables(conn) #get your distances

Re: [R] image.plot adding x-axis labels. Please Help

2012-04-04 Thread David Winsemius
On Apr 3, 2012, at 11:16 PM, David Lyon wrote: Sorry that didnt work for me, any ideas? You _could_ indicate which package the image.plot function comes from. You _could_ include dput on a sufficient segment of `data1` to offer a reproducible test case. You _could_ indicate in what

Re: [R] Package seems to be present but library don't find it

2012-04-04 Thread Duncan Murdoch
On 12-04-03 12:25 PM, Marc Girondot wrote: Indeed I get this error message when I install the library using R CMD INSTALL but not within the GUI (in MacOsX). Good to know that R CMD INSTALL is more verbose and permits to track bug. I followed up in R-sig-mac, and it turns out the reason you

Re: [R] identify time span in date vector

2012-04-04 Thread Petr PIKAL
Hi Dear Petr, thanks for taking your time. For this input, the first element should be selected since there are more than 3 more dates within one year (basically, all other dates are within one year) and at least one of them is more than 3 month later. In the meantime, I came

Re: [R] logistic regression

2012-04-04 Thread David Winsemius
On Apr 3, 2012, at 9:25 PM, Melrose2012 wrote: I am trying to plot the logistic regression of a dataset (# of living flies vs days the flies are alive) and then fit a best-fit line to this data. Here is my code: plot(fflies$living~fflies$day,xlab=Number of Days,ylab=Number of Fruit

[R] Calculating NOEL using R and logistic regression - Toxicology

2012-04-04 Thread Jarno Tuimala
Dear Danielle, At least in industrial toxicology (my original background) the recent tendency has been to use benchmark dose (BSD) approach instead of NOEL or NOAEL approach due to various problems with the definition and estimation of NO(A)EL. In R this can be achieved using the packages drc and

[R] cluster analysis with pairwise data

2012-04-04 Thread paladini
Hello, I want to do a cluster analysis with my data. The problem is, that the variables dont't consist of single value but the entries are pairs of values. That lokks like this: Variable 1:Variable2: Variable3: ... (1,2) (1,5) (4,2) (7,8) (3,88)

[R] Calculating NOEL using R and logistic regression - Toxicology

2012-04-04 Thread Jarno Tuimala
Make that bmd(fit, 0.01) in my previous post. Jarno __ 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,

Re: [R] filling small gaps of N/A

2012-04-04 Thread R. Michael Weylandt
No problem -- best of luck with it: the zoo package is one of the best documentation-wise and I'd advise you to look at the available vignettes when you have time. Vignettes are extended documentation included in some packages that give a more systematic presentation than can be given in the help

Re: [R] Trying to merge new data set to bottom of old data set. Both are zoo objects.

2012-04-04 Thread Gabor Grothendieck
On Wed, Apr 4, 2012 at 1:47 AM, knavero knav...@gmail.com wrote: Here's a case where it doesn't work. Again, the problem is that when I use the rbind or concatenate functions, the 2012 data set seems to go ahead of the 2010 and 2011 portions of the data set. The problem seems dependent on the

[R] STAR Spatio Temporal AutoRegressive models

2012-04-04 Thread vasilis
Hi there, do you know if there is a package that fits spatio temporal autoregressive models in R? thanks vasilis -- View this message in context: http://r.789695.n4.nabble.com/STAR-Spatio-Temporal-AutoRegressive-models-tp4531793p4531793.html Sent from the R help mailing list archive at

Re: [R] read.socket utils package : something is going wrong

2012-04-04 Thread msalese
Found solution. I've changed the library and functions to open and read sockets. Using base package I wrote: msg3-function=subscribe|item=MI.EQCON.1|schema=last_price;ask;bid msg4-function=unsubscribe #open socket connection socketPointer-socketConnection('localhost', port=5333, server=FALSE)

Re: [R] identify time span in date vector

2012-04-04 Thread David Winsemius
On Apr 4, 2012, at 8:19 AM, Petr PIKAL wrote: Hi Dear Petr, thanks for taking your time. For this input, the first element should be selected since there are more than 3 more dates within one year (basically, all other dates are within one year) and at least one of them is more than

[R] npRmpi trouble - mpi.comm.spawn causes segfault

2012-04-04 Thread Peter Man
Dear all, I have a large dataset of randomly generated weighed sample for which I wish to compute a kernel density estimate. I have used the np package successfully for smaller datasets, however for the larger ones, they take too long when using the cross validation options for bandwidth

[R] spaghetti plots in R

2012-04-04 Thread uday
I would like to plat some spaghetti plots from my data , ma data is as follows ak[1:3,] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 0.3211745 0.4132568 0.5649930 0.6920562 0.7760113 0.8118568 0.8609301 0.9088819 0.9326736 [2,] 0.3159234

Re: [R] spaghetti plots in R

2012-04-04 Thread Liviu Andronic
On Wed, Apr 4, 2012 at 4:22 PM, uday uday_143...@hotmail.com wrote: I would like to plat some spaghetti plots from my data , ma data is as See: require(sos) findFn('spaghetti') Liviu follows ak[1:3,]          [,1]      [,2]      [,3]      [,4]      [,5]      [,6]      [,7] [,8]      [,9]

[R] convert a list to a data frame

2012-04-04 Thread Sam Steingold
I have a huge list (returned by fromJSON) with elements like this: $`zz/3260` $`zz/3260`$name [1] myname $`zz/3260`$status [1] active $`zz/3260`$vectors $`zz/3260`$vectors$`vector/241` $`zz/3260`$vectors$`vector/241`$channel [1] channel/300 $`zz/3260`$vectors$`vector/241`$targets

[R] plot with a regression line(s)

2012-04-04 Thread Sam Steingold
I am sure a common need is to plot a scatterplot with some fitted line(s) and maybe save to a file. I have this: plot.glm - function (x, y, file = NULL, xlab = deparse(substitute(x)), ylab = deparse(substitute(y)), main = NULL) { m - glm(y ~ x) if (!is.null(file))

Re: [R] convert a list to a data frame

2012-04-04 Thread Bert Gunter
Please first search yourself before posting. Google on R convert list to data frame. -- Bert On Wed, Apr 4, 2012 at 8:11 AM, Sam Steingold s...@gnu.org wrote: I have a huge list (returned by fromJSON) with elements like this: $`zz/3260` $`zz/3260`$name [1] myname $`zz/3260`$status [1]

Re: [R] plot with a regression line(s)

2012-04-04 Thread R. Michael Weylandt michael.weyla...@gmail.com
I'm not sure what your definition of easier would be, but there are some style things you might want to be aware of: I) the name is likely to hit up against the S3 generic plot() when applied to a glm object. This might lead to strange bugs at some point. II) you can test !is.null once and use

Re: [R] Trying to understand factors

2012-04-04 Thread MacQueen, Don
I'd like to make the distinction between the purpose of factors, i.e., what they are intended for, and how that purpose is accomplished. Their purpose is for use in statistical models. The simplest example is analysis of variance, where predictors are commonly referred to as factors. Factors in R

Re: [R] plot with a regression line(s)

2012-04-04 Thread David Winsemius
On Apr 4, 2012, at 11:30 AM, R. Michael Weylandt michael.weyla...@gmail.com wrote: I'm not sure what your definition of easier would be, but there are some style things you might want to be aware of: I) the name is likely to hit up against the S3 generic plot() when applied to a glm

Re: [R] spaghetti plots in R

2012-04-04 Thread uday
Hi Liviu , thanks for post , but I could not find findFn('spaghetti') , I can see the following functions in sos package Extract.findFn findFn grepFn hits installPackages PackageSum2 PackageSummary print.findFn sortFindFn summary.findFn unionFindFn writeFindFn2xls -- View this

Re: [R] spaghetti plots in R

2012-04-04 Thread Liviu Andronic
On Wed, Apr 4, 2012 at 5:04 PM, uday uday_143...@hotmail.com wrote: Hi Liviu , thanks for post , but I could not find findFn('spaghetti') , I can see the following functions in sos package Extract.findFn findFn After installing 'sos', use the 'findFn()' function. For example, run

Re: [R] cluster analysis with pairwise data

2012-04-04 Thread David L Carlson
You can create distance matrices for each Variable, square them, sum them, and take the square root. As for getting the data into a data frame, the simplest would be to enter the three variables into six columns like the following: data [,1] [,2] [,3] [,4] [,5] [,6] [1,]1215

Re: [R] Filling empty List in a FOR LOOP

2012-04-04 Thread MacQueen, Don
Try A[[1]] - NA (It is of course up to you to do the tests, presumably using if(), to decide when to assign NA to the list element.) -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 3/31/12 7:53 PM, michaelyb

Re: [R] A contour plot question - vis.gam () function in mgcv

2012-04-04 Thread ilai
On Tue, Apr 3, 2012 at 6:22 PM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2012-04-03 15:49, ilai wrote: Try to plot the points first followed by vis.gam(...,type='contour', color='bw', add=T) instead of vis.gam followed by points. HTH Or, if vis.gam gives you default scales that you wish

Re: [R] cluster analysis with pairwise data

2012-04-04 Thread Petr Savicky
On Wed, Apr 04, 2012 at 01:32:10PM +0200, paladini wrote: Hello, I want to do a cluster analysis with my data. The problem is, that the variables dont't consist of single value but the entries are pairs of values. That lokks like this: Variable 1:Variable2: Variable3: ..

Re: [R] Looking for the name of a certain kind of quantile plot

2012-04-04 Thread cberry
Carl Witthoft c...@witthoft.com writes: Hi, While playing with quantile-quantile plots, I wrote up some code which plots something strangely different. Here's the pseudocode: testhist - hist(sample_data) refhist - hist(rnorm(n, mean=0,sd=1)) # for some large-ish n cumtest -

[R] markov regime switching models

2012-04-04 Thread Marie Morel
Dear Sir, I saw a question from a member in 2007 asking for regime switching model and I am looking for the same kind of model. I also saw a project named RSNL but I don't know if this one is available and if we can have access to the code to change things if needed... actually I used to build

Re: [R] image.plot adding x-axis labels. Please Help

2012-04-04 Thread ilai
On Wed, Apr 4, 2012 at 6:05 AM, David Winsemius dwinsem...@comcast.net wrote: On Apr 3, 2012, at 11:16 PM, David Lyon wrote: Sorry that didnt work for me, any ideas? You _could_ indicate which package the image.plot function comes from. You _could_ include dput on a sufficient segment of

Re: [R] simulate correlated binary, categorical and continuous variable

2012-04-04 Thread Greg Snow
How are you calculating the correlations? That may be part of the problem, when you categorize a continuous variable you get a factor whose internal representation is a set of integers. If you try to get a correlation with that variable it will not be the polychoric correlation. Also do you

Re: [R] convert a list to a data frame

2012-04-04 Thread Sam Steingold
sorry, google does give a good start. Google on R convert list to data frame. as.data.frame(do.call(rbind,a)) returns an object which I don't understand. summary(f) name.Length name.Class name.Modestatus 1 -none- characterLength:4445 1

Re: [R] cluster analysis with pairwise data

2012-04-04 Thread ilai
On Wed, Apr 4, 2012 at 10:12 AM, Petr Savicky savi...@cs.cas.cz wrote: On Wed, Apr 04, 2012 at 01:32:10PM +0200, paladini wrote:  Var1 - c((1,2), (7,8), (4,7))  Var2 - c((1,5), (3,88), (12,4))  Var3 - c((4,2), (6,5), (4,4))  DF - data.frame(Var1, Var2, Var3, stringsAsFactors=FALSE) If you

Re: [R] convert a list to a data frame

2012-04-04 Thread Bert Gunter
??? What is a? ?str str(a) ?do.call On Wed, Apr 4, 2012 at 9:34 AM, Sam Steingold s...@gnu.org wrote: sorry, google does give a good start. Google on R convert list to data frame.  as.data.frame(do.call(rbind,a)) returns an object which I don't understand. summary(f)  name.Length  

Re: [R] unable to move temporary installation

2012-04-04 Thread Uwe Ligges
On 03.04.2012 19:43, Drew Tyre wrote: A final followup. I have identified a rather extreme workaround. The problem arises when the function utils:::unpackPkgZip uses file.rename(...) to move the unzipped binary package from the temporary directory that it was unpacked into into the proper

Re: [R] Fisher's LSD multiple comparisons in a two-way ANOVA

2012-04-04 Thread Jinsong Zhao
On 2012-04-03 20:03, Rmh wrote: yes. See ?glht in the multcomp package, and the examples using glht in ?MMC in the HH package. Sent from my iPhone Thank you very much for the clues. However, I can't figure out how to construct the linfct in glht. I also tried to inverse the computation

Re: [R] unable to move temporary installation

2012-04-04 Thread Henrik Bengtsson
My $.01 contribution without having read the complete thread: Some other process/service is locking your file/directory. There are a few Windows tools out there helping your to narrow down exactly which, e.g. http://www.guidingtech.com/10175/tools-to-delete-locked-files-in-windows/ /Henrik

Re: [R] BRugs crash, question

2012-04-04 Thread Jack Tanner
Bob O'Hara rni.boh at gmail.com writes: On 4 April 2012 05:35, Jack Tanner ihok at hotmail.com wrote: samplesBgr(beta) # crash samplesBgr(beta, plot=FALSE) # also crash Have you plotted your histories? I haven't used samplesBgr() much, so I don't know how stable it is (although I do

[R] Print std. Error separately from mle-class object

2012-04-04 Thread Aziz, Muhammad Fayez
Hi, I am using power.law.fit to get an mle-class object in tmp and print summary(tmp), coef(tmp) and logLik(tmp). I wanted to print the std. error for alpha separately as I want to show these values concisely in a graph legend. coef(summary(tmp)) displays the alpha and std. error jointly,

[R] crosstabs and histograms with flexible binning of dates

2012-04-04 Thread davideps
Hi, First, thank you to Duncan Mackay for getting me started processing dates with R. Unfortunately, I need to do a little more than I initially expected. I have 5K lines of data that look like this: ID AREA DATE 0001 Center 2010-10-15 0002 Center 2010-01-02 0003

Re: [R] spaghetti plots in R

2012-04-04 Thread uday
Hi Liviu , now I can see that function but the problem is that its only applicable for single data frame. as I wrote in my first post that I got 2 different matrix with same dimensions ( 3x 12 here in example) , so if I plot normal plot using plot function plot(ak[1,],pre[1,],type=l)

Re: [R] Trying to merge new data set to bottom of old data set. Both are zoo objects.

2012-04-04 Thread knavero
Okay, will do. Thanks for all the handy advice Gabor. Ugh, it's such a stupid bug once I actually know what is going on. I need to go over my Unix date/time format specifiers, and I'll probably use the rep function to simplify and reducing the amount of code. A lot of that is definitely new to me.

Re: [R] spaghetti plots in R

2012-04-04 Thread Rui Barradas
Hello, uday wrote Hi Liviu , now I can see that function but the problem is that its only applicable for single data frame. as I wrote in my first post that I got 2 different matrix with same dimensions ( 3x 12 here in example) , so if I plot normal plot using plot function

[R] using metafor for meta-analysis of before-after studies

2012-04-04 Thread MP . Sylvestre
Greetings, I wish to conduct a meta-analysis for which the outcome is a continuous variable measured on the same individuals before and after an intervention. Hence, the comparison is not made between two groups, but within groups, at diffrent times. Each study reports the mean outcome and

Re: [R] spaghetti plots in R

2012-04-04 Thread R. Michael Weylandt
Can't you just combine your matrices into a single matrix: rbind() or cbind() should do the job. Michael On Wed, Apr 4, 2012 at 12:24 PM, uday uday_143...@hotmail.com wrote: Hi Liviu , now I can see that function but the problem is that its only applicable for single data frame. as I wrote in

Re: [R] Question about randomForest

2012-04-04 Thread Liaw, Andy
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Saruman I dont see how this answered the original question of the poster. He was quite clear: the value of the predictions coming out of RF do not match what comes out of the predict function using

Re: [R] plot with a regression line(s)

2012-04-04 Thread S Ellison
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Sam Steingold plot.glm - function (x, y, file = NULL, xlab = deparse(substitute(x)), ylab = deparse(substitute(y)), main = NULL) { m - glm(y ~ x)

Re: [R] Calculating NOEL using R and logistic regression - Toxicology

2012-04-04 Thread Danielle Duncan
Thanks everyone for the advice, you raise interesting points. Maybe the best thing for me to do is do an ANOVA in R with binomial data (if possible) and find the lowest dose that gives a significant difference from the controls. On Mon, Apr 2, 2012 at 2:45 PM, Danielle Duncan

Re: [R] convert a list to a data frame

2012-04-04 Thread Sam Steingold
Thanks for your reply! 1. the strings I replaced with and are very long; I wish I could replace them in the object all, not just in text 2. `all` is the result of as.data.frame(do.call(rbind,l),stringsAsFactors = FALSE) 3. I get my data frame as fr - data.frame(audience =

Re: [R] Calculating NOEL using R and logistic regression - Toxicology

2012-04-04 Thread Danielle Duncan
I suppose I'll just report a LC10 using the dose.p function in the package MASS using my glm fitted logistic regression on binomial data. Thanks everyone for ideas input! The LOEC seems to be a flawed calculation...I'll research it. Again, thanks all! On Mon, Apr 2, 2012 at 2:45 PM, Danielle

[R] Rgui maintains open file handles after Sweave error

2012-04-04 Thread Alexander Shenkin
Hello Folks, When I run the document below through sweave, rgui.exe/rsession.exe leaves a file handle open to the sweave-001.pdf graphic (as verified by process explorer). Pdflatex.exe then crashes (with a Permission Denied error) because the graphic file is locked. This only seems to happen

[R] how to avoid this : underflow occurred in 'lgammacor'

2012-04-04 Thread casperyc
Hi all, I am constructing a likelihood involving the following lbeta(j + a, k - j + b) where j,k are constants and a and b are parameters (0). While doing the optimization, the error sometimes occurs, In lbeta(j + a, k - j + b) : underflow occurred in 'lgammacor' Is there a way to avoid it?

Re: [R] Rgui maintains open file handles after Sweave error

2012-04-04 Thread Henrik Bengtsson
See ?closeAllConnections Suggestion to the maintainer of Sweave: atomify the figure generation, e.g. use { pdf(); on.exit(dev.off()); {...}; } or similar, instead of { pdf(); {...}; dev.off(); } possibly by leaving a copy of the fault figure file for troubleshooting. /Henrik On Wed, Apr 4, 2012

Re: [R] Rgui maintains open file handles after Sweave error

2012-04-04 Thread Alexander Shenkin
Thanks for the reply, Henrik. Process Explorer still shows the file handle as being open, but R only shows the following: showConnections(all=TRUE) description class mode text isopen can read can write 0 stdin terminal r text opened yesno 1 stdoutterminal w text opened

Re: [R] Rgui maintains open file handles after Sweave error

2012-04-04 Thread Yihui Xie
Herik's suggestion is an absolutely good practice which guarantees the device is always closed. That is what I did in the knitr package, so you can probably take a look at http://yihui.name/knitr/ Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department

[R] Deadlines Approaching: R User Conference Registration, Hotels, Student Scholarships

2012-04-04 Thread Frank Harrell
DEADLINE FAST APPROACHING – 8th Annual International R User Conference useR! 2012, Nashville, Tennessee USA Registration Deadlines: Early Registration: Passed Regular Registration: Mar 1- May 12 Late Registration: May 13 – June 4 On-Site Registration: June 12 – June 15 Please note: Nashville is

[R] Selecting obs within groups defined by 2 variables

2012-04-04 Thread Naomi Sugie
Hello, I am relatively new to R, and I am trying to select the last observation within a group, where the group is defined by two variables. One of the variables is a date. In the below example, C3 varies within C2, which varies within C1. I need to select the last observation in C3 for 4

[R] meta-analysis, outcome = OR associated with a continuous independent variable

2012-04-04 Thread Marie-Pierre Sylvestre
Hello everyone, I want to do a meta-analysis of case-control studies on which an OR was computed based on a continuous exposure. I have found several several packages (metafor, rmeta, meta) but unless I misunderstood their main functions, it seems to me that they focus on two-group comparisons

Re: [R] Selecting obs within groups defined by 2 variables

2012-04-04 Thread Peter Alspach
Tena koe Naomi There are lots of ways to do this. Here are a couple (note I've made a minor modification to your example): naomi C1 C2 C3 1 1 x 1 2 1 x 2 3 1 y 1 4 1 y 2 5 2 x 1 6 2 x 2 7 2 x 3 8 2 y 1 9 2 y 2 tapply(naomi[,3], naomi[,1:2], function(x)

[R] recover lost global function

2012-04-04 Thread Sam Steingold
Since R has the same namespace for functions and variables, c - 1 kills the global function, which can be restored by c - get(c,mode=function) Is there a way to prevent R from overriding globals or at least warning when I do that or at least warning when I replace a functional value with

Re: [R] convert a list to a data frame

2012-04-04 Thread Sam Steingold
* Sam Steingold f...@tah.bet [2012-04-04 14:58:15 -0400]: 1. the strings I replaced with and are very long; I wish I could replace them in the object all, not just in text i.e., I have a long list with elements with long names. how do I replace all these long names with something

Re: [R] recover lost global function

2012-04-04 Thread Duncan Murdoch
On 12-04-04 4:52 PM, Sam Steingold wrote: Since R has the same namespace for functions and variables, c- 1 kills the global function, which can be restored by c- get(c,mode=function) Is there a way to prevent R from overriding globals or at least warning when I do that or at least warning

[R] extract data

2012-04-04 Thread Roslina Zakaria
HI, I would like to extract data in a specific way.  For example, the rainfall data 0,0,1.5,0,0, 3,1,2.5,0,0,0,0, 2.3,0,0,0, 2.1,1.4,0,0,0, 3,2,1,0,0,0... data_1: 1.5, 2.3   ( a single nonzero data between zeros data) data_2: 3.1, 2.5, 2.1,1.4   ( two nonzero data between zeros

[R] extract data

2012-04-04 Thread Roslina Zakaria
HI, I would like to extract data in a specific way.  For example, the rainfall data 0,0,1.5,0,0, 3,1,2.5,0,0,0,0, 2.3,0,0,0, 2.1,1.4,0,0,0, 3,2,1,0,0,0... data_1: 1.5, 2.3   ( a single nonzero data between zeros data) data_2: 3.1, 2.5, 2.1,1.4   ( two nonzero data between

Re: [R] recover lost global function

2012-04-04 Thread Sam Steingold
* Duncan Murdoch zheqbpu.qha...@tznvy.pbz [2012-04-04 17:00:32 -0400]: There's no warning when you mask a function with a non-function at top level, and little need for one, because R does the right search based on the fact that you're making a function call: c [1] 1 c(1,2) [1] 1 2 why

Re: [R] recover lost global function

2012-04-04 Thread Sam Steingold
* Duncan Murdoch zheqbpu.qha...@tznvy.pbz [2012-04-04 17:00:32 -0400]: There's no warning when you mask a function with a non-function at top level, and little need for one, because R does the right search based on the fact that you're making a function call: c [1] 1 c(1,2) [1] 1 2 why

Re: [R] meta-analysis, outcome = OR associated with a continuous independent variable

2012-04-04 Thread Thomas Lumley
On Thu, Apr 5, 2012 at 8:24 AM, Marie-Pierre Sylvestre mp.sylves...@gmail.com wrote: Hello everyone, I want to do a meta-analysis of case-control studies on which an OR was computed based on a continuous exposure. I have found several several packages (metafor, rmeta, meta) but unless I

Re: [R] convert a list to a data frame

2012-04-04 Thread David Winsemius
On Apr 4, 2012, at 4:54 PM, Sam Steingold wrote: * Sam Steingold f...@tah.bet [2012-04-04 14:58:15 -0400]: 1. the strings I replaced with and are very long; I wish I could replace them in the object all, not just in text i.e., I have a long list with elements with long names. how

Re: [R] Selecting obs within groups defined by 2 variables

2012-04-04 Thread Naomi Sugie
Hi Peter, Thanks! This was very helpful and worked perfectly. Naomi On Apr 4, 2012, at 4:52 PM, Peter Alspach wrote: Tena koe Naomi There are lots of ways to do this. Here are a couple (note I've made a minor modification to your example): naomi C1 C2 C3 1 1 x 1 2 1 x 2 3 1 y

Re: [R] Plotting lines and points on the second plot when using gap.plot in plotrix

2012-04-04 Thread sophykim
you need to subtract the length of gap in y-axis. Good luck! -- View this message in context: http://r.789695.n4.nabble.com/Plotting-lines-and-points-on-the-second-plot-when-using-gap-plot-in-plotrix-tp804226p4533129.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Selecting obs within groups defined by 2 variables

2012-04-04 Thread Rui Barradas
Hello, The by function does not seem to allow two variables in the Indices argument: Yes it does, but you must use a list of variables. (Read the help for 'by': INDICESa factor or a list of factors, each of length nrow(data).) mydata - read.table(text= C1 C2 C3 1 x 1 1 x 2 1 y 1

[R] Subscript Error

2012-04-04 Thread z2.0
json_dir is a list of JSON lists mapping lat/long route points between locations using CloudMade's API. post_url is the URL of the HTTP request for (n in json_dir) { i = i + 1 if (typeof(json_dir[[i]]) != NULL) { if (i == 1) { dat_add

[R] Using download.file() to grab information from a Password Protected Website

2012-04-04 Thread Michael Roberts
I am new to R and have been spinning my wheels on the following. *Issue:* I have a membership to a website, and I want to grab data from the website using download.file(). download.file(url, destfile, method, quiet = T, mode = w, cacheOK = TRUE) The R Documentation is helpful. However, I have

Re: [R] convert a list to a data frame

2012-04-04 Thread z2.0
Have you looked at plyr? Generally, ldply works well for this sort of thing. -- View this message in context: http://r.789695.n4.nabble.com/convert-a-list-to-a-data-frame-tp4532206p4533257.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] extract data

2012-04-04 Thread Rui Barradas
Hello, Roslina Zakaria wrote HI, I would like to extract data in a specific way.  For example, the rainfall data 0,0,1.5,0,0, 3,1,2.5,0,0,0,0, 2.3,0,0,0, 2.1,1.4,0,0,0, 3,2,1,0,0,0... data_1: 1.5, 2.3   ( a single nonzero data between zeros data) data_2:

Re: [R] how to load functions from file

2012-04-04 Thread Rolf Turner
On 04/04/12 22:32, Bert Gunter wrote: Rolf: Google on load functions into R. A post referencing source() (from Henrik Bengtsson is the first hit. Tried that just now. The only hits I got were to *your* post; no hits on any post from Henrik Bengtsson. These things are never as easy and

[R] Shapiro-Wilk cpoefficients: 2 Qs

2012-04-04 Thread Ted Harding
Greetings! I want to have the coefficients that R uses in shapiro.test() for the Shapiro-Wilk test for a prticular sample size, i.e. the a[i] in W = Sum(a[i]*x[i])/(Sum(x[i] - mean(x))^2) (where the x[i] are sorted). Two questions: Q1: Is there a readymade R function from which I can extract

Re: [R] how to load functions from file

2012-04-04 Thread Sarah Goslee
I just tried it, because I'm curious that way. If I search for load functions into R I get only this thread. If I search for load functions into R (no quotes), I get the referenced discussion from Henrik Bengtsson: ttps://stat.ethz.ch/pipermail/r-help/2008-September/173606.html As in so many

Re: [R] how to load functions from file

2012-04-04 Thread Rolf Turner
On 05/04/12 10:10, Sarah Goslee wrote: I just tried it, because I'm curious that way. If I search for load functions into R I get only this thread. If I search for load functions into R (no quotes), I get the referenced discussion from Henrik Bengtsson:

Re: [R] Print std. Error separately from mle-class object

2012-04-04 Thread Jeff Newmiller
Are you aware that the summary function normally returns a data value that you can extract values from and format to your hearts desire? try str(coef(summary(tmp))) and read ?mle-class (and try to provide a reproducible example next time)

Re: [R] how to load functions from file

2012-04-04 Thread David Winsemius
On Apr 4, 2012, at 6:10 PM, Sarah Goslee wrote: I just tried it, because I'm curious that way. If I search for load functions into R I get only this thread. If I search for load functions into R (no quotes), I get the referenced discussion from Henrik Bengtsson:

[R] Remove carriage return in writing tab-delimited file.

2012-04-04 Thread kickout
Having problems with the write.table function. I can write a tab delimited file just fine, but for each line in my matrix its inputs a carriage return when i dont want it to. For example my matrix might be: ID V1 V2 V3 FARY1004 1 2 3 FARY2067 2 3 1 FARY4587 2 2 2 And I want the written File to

  1   2   >