Re: [R] Output Nicely formatted tables from R

2008-07-21 Thread Abhijit Dasgupta
Please look at http://biostat.mc.vanderbilt.edu/twiki/pub/Main/StatReport/latexFineControl.pdf for ways to do fine control of tabular data formatting via Sweave. Bill Cunliffe wrote: Hi there, I've spent a while searching for ways of outputting table data from R in presentable formats, su

[R] Hmisc summary.formula.reverse

2010-02-18 Thread Abhijit Dasgupta
Hello, Can summary.formula.reverse be customized to allow other summary statistics to be reported rather than the quartiles and mean +/- sd? The "fun" option apparently doesn't apply when method='reverse' Thanks -- Abhijit Dasgupta, PhD Statistician | Clinical Sci

[R] tkrplot installation problems

2009-04-06 Thread Abhijit Dasgupta
Hello, I'm running R 2.8.1 on Ubuntu Hardy. I'm trying to install tkrplot. Using r-cran-tkrplot from the repository, I'm getting the following error: > library(tkrplot) Loading required package: tcltk Loading Tcl/Tk interface ... done Error in structure(.External("dotTcl", ..., PACKAGE = "tcltk

[R] Fwd: ForestPlot or similar

2010-10-30 Thread Abhijit Dasgupta
> From: Abhijit Dasgupta > Date: October 31, 2010 1:30:02 AM EDT > To: Matt Shotwell > Subject: Re: [R] ForestPlot or similar > > I just did something very similar using ggplot's pointrange geom. In the > following, I'm plotting hazard ratios, for which the nom

Re: [R] Question about ggplot2

2010-11-02 Thread Abhijit Dasgupta
from where you are, year.plot+ylim(0,0.1) Abhijit On Nov 2, 2010, at 9:57 AM, Shige Song wrote: > Dear All, > > I am trying to graph a simple scatter plot where the x axis is year > and the y axis is a percentage (percentage of infant death). Instead > of plotting the raw data, I want to plot

Re: [R] ForestPlot or similar

2010-11-02 Thread Abhijit Dasgupta
You need to use a print statement print(forestplot()) Lattice and ggplot2 need to be explicitly printed to get output into jpeg. I believe Matt's function only provides the graphics object and not the printed version. Abhijit On 11/2/2010 4:32 PM, Mestat wrote: > Thanks Matt, > I am having

Re: [R] ggplot output

2010-11-04 Thread Abhijit Dasgupta
The other way (in the same spirit as par(mfrow = ...) in base graphics) is to use the grid.arrange function in the gridExtra package. See it's documentation for examples. On Nov 4, 2010, at 9:36 AM, ashz wrote: > > Dear All, > > I have this script: > > dat <- data.frame(Month = hstat$Date,

Re: [R] Several lattice plots on one page

2010-11-09 Thread Abhijit Dasgupta
Another solution is using grid.arrange in the gridExtra package. This works like the par(mfrow=...) command, but for grid-based graphics like lattice and ggplot2 On Nov 8, 2010, at 1:19 PM, Marcus Drescher wrote: > Dear all, > > I am trying (!!!) to generate pdfs that have 8 plots on one page

Re: [R] How to Read a Large CSV into a Database with R

2010-11-16 Thread Abhijit Dasgupta
Thanks On 11/16/2010 12:41 PM, Seth Falcon wrote: > Hi Abhijit, > > [I've cc'd R-help to keep the discussion on the list] > > On Tue, Nov 16, 2010 at 8:06 AM, Abhijit Dasgupta > wrote: > >> Seth, >> >> I was looking for something like this to

Re: [R] Reading large SAS dataset in R

2011-01-06 Thread Abhijit Dasgupta
Santanu, I second Phil's suggestion. sas.get is actually quite nice. Another current option is using a command-line utility called dsread (http://www.oview.co.uk/dsread/) to convert the sas7bdat file to a csv or tsv format, which can then easily be read into R using read.table and its deriva

Re: [R] How to reshape wide format data.frame to long format?

2011-01-20 Thread Abhijit Dasgupta
I would think that the following code should work: newcodesM = reshape(codesM, id=1) If other variables in the data.frame are factors, reshape thinks all of them are ID variables and tries to use all of them as "keys". Specifying the id variable you want to keep (I used id=1 since "key" is in t

Re: [R] How to reshape wide format data.frame to long format?

2011-01-20 Thread Abhijit Dasgupta
As for your second question, you could certainly do newcodesM = transform(newcodesM, variable1 = unlist(strsplit(variable,'\\.'))[1], variable2 = unlist(strsplit(variable, '\\.'))[2], variable3 = unlist(strsplit(variable,'\\.'))[3]) though I'm sure there is a more efficient use of strsplit in t

Re: [R] ESS question. How to get rid of ess-smart-underscore?

2010-08-09 Thread Abhijit Dasgupta
I bogged about 3 possible solutions recently (statbandit.wordpress.com). Possibly the 2nd most recent post. Abhijit On Aug 9, 2010 8:28 AM, "W Eryk Wolski" wrote: Hi, ESS replaces "_" by "<-". How can I switch off this feature? I need to be able to type the underscore Thanks Eryk -- Witold

Re: [R] Sweave

2010-08-17 Thread Abhijit Dasgupta
Please read the Sweave documentation. The default is set to 0.8\textwidth. You have to change a \SweaveOpt. On Aug 17, 2010 7:00 PM, "Randall Wrong" wrote: Dear R users, I am using Sweave. I would like to use the width option for the graphics : \begin{figure}[h!] \centering \includegraphics[w

Re: [R] Sweave

2010-08-18 Thread Abhijit Dasgupta
No, the \setkeys statement should be in the main body of the Sweave file, not in the R code part. On Aug 18, 2010 9:20 AM, "Randall Wrong" wrote: Thanks Karen and Abhijit. I have read the section 4.1.2 of the Sweave user manual. Actually the manual lacks example code. I would like to change th

Re: [R] Problems in snow: can't open connection with nodes

2010-09-07 Thread Abhijit Dasgupta
This is a problem a few of us have experienced with snow, and there is a discussion on the R-hpc list about this. No solution yet, as far as I can tell. Abhijit On 9/7/2010 9:18 AM, bfoubert wrote: > I'm working with snow and created a local cluster. So far, the same code has > always worked (pl

[R] Something similar to layout in lattice or ggplot

2010-09-07 Thread Abhijit Dasgupta
Hi, Is there a function similar to the layout function in base graphics in either lattice or ggplot? I'm hoping someone has written a function wrapper to the appropriate commands in grid that would make this easier :) Abhijit [[alternative HTML version deleted]] __

Re: [R] combine lattice plot and standard R plot

2011-05-04 Thread Abhijit Dasgupta
Hi, All of the components in the grid.arrange statement are from ggplot2 and lattice, which are both in turn based on the grid package. What grid.arrange is able to do is use the grid framework to arrange the individual plots on a page. The base graphics are not based on grid, and so won't wor

Re: [R] Summarize by two or more attributes

2011-05-17 Thread Abhijit Dasgupta
One possibility is: library(doBy) summaryBy(Rate~Source+Bin, data=Df, FUN=sum) On 5/17/2011 12:48 PM, LCOG1 wrote: > Okay everyone heres a likely softball for someone. > > Consider the following data frame: > > #Create data > x<-rep(c(1,15),10) > y<-rnorm(20) > z<-c(rep("auto",10),rep("bus",10))

[R] snow makeCluster (makeSOCKcluster) not working in R-2.11

2010-05-12 Thread Abhijit Dasgupta
(cl) When I run the same code in Windows R-2.11 (either 32-bit or 64-bit), R hangs at cl<-makeCluster(6, type='SOCK') and no R processes are spawned. I was wondering if others have encountered this problem, and any suggestions on solving this would be greatly appreciated. -- Abhiji

Re: [R] Plot with same font like in LaTeX

2011-03-02 Thread Abhijit Dasgupta
The tikzDevice package can do this. On 3/2/2011 6:48 AM, Jonas Stein wrote: > Hi, > > i want to make my plots look uniform in LaTeX documents. > > - usage of the same font on axes and in legend like LaTeX uses >(for example "Computer Modern") > > - put real LaTeX formulas on the axes > > Hav

Re: [R] Rstudio question

2011-03-04 Thread Abhijit Dasgupta
Seconded. Go to the support forum at www.rstudio.org and post your question/bug/suggestion. Those folks have been excellent in their response times and feedback. On 3/4/2011 9:14 AM, Shige Song wrote: > Why don't you post the question to the RStudio support forum? The > folks there are quite re

Re: [R] value of W seems to be suspicious in the mann-whitney wilcox related test. what could be the problem

2011-03-14 Thread Abhijit Dasgupta
You need to read up on the Wilcoxon signed-rank test and the output from wilcox.test!!! The confidence interval is of the difference of medians, which can certainly be negative. In fact, your estimate is -33, and the confidence interval is (-68, 0) which is reasonable. The value of W is a posi

Re: [R] value of W seems to be suspicious in the mann-whitney wilcox related test. what could be the problem

2011-03-14 Thread Abhijit Dasgupta
You need to read up on the Wilcoxon signed-rank test and the output from wilcox.test!!! The confidence interval is of the difference of medians, which can certainly be negative. In fact, your estimate is -33, and the confidence interval is (-68, 0) which is reasonable. The value of W is a posi

Re: [R] Opposite of paste function

2011-08-10 Thread Abhijit Dasgupta
or, gsub('V','',vn) On 8/10/2011 2:23 PM, Peter Langfelder wrote: > On Wed, Aug 10, 2011 at 11:22 AM, Soyeon Kim wrote: >> Dear All, >> >> I have vn variable >>> vn >> [1] "V300" "V376" >> What I want to get is >> 300 376 > as.numeric(substring(vn, 2)) > > HTH > > Peter > > _

Re: [R] Avoiding for Loop for moving average

2011-09-02 Thread Abhijit Dasgupta
There is a recent blog post by Dirk Eddelbeutel on how to do something similar using his Rcpp package and C++, with massive time improvements. http://dirk.eddelbuettel.com/blog/ On 9/2/2011 12:43 PM, Noah Silverman wrote: > Hello, > > I need to calculate a moving average and an exponentially wei

Re: [R] Hints for Data Mining

2011-09-15 Thread Abhijit Dasgupta
Please see the R Machine Learning Task View (http://cran.r-project.org/web/views/MachineLearning.html) for a starting point on decision trees. On 9/14/2011 7:11 PM, Lorenzo Isella wrote: > Dear All, > I am recycling a previous email of mine where I asked some questions > about clustering mixed

Re: [R] new to R need urgent help!

2011-06-23 Thread Abhijit Dasgupta
On Jun 23, 2011, at 4:42 PM, elisheva corn wrote: > hi all- > > I am doing some research, have never used R before until today and need to > understand the following program for a project. > if some one could PLEASE help me understand this program ASAP i would > GREATLY appreciate it (any syntax

Re: [R] trying to import xls or xlsx files

2011-06-23 Thread Abhijit Dasgupta
Gabor's answer explains the error perfectly. You might want to look at the xlsx package as well as the RODBC package if you're on Windows. RODBC is really fast, if you can use it. Abhijit On Jun 23, 2011, at 2:00 PM, wwreith wrote: > library(xlsReadWrite) > mydata<-read.xls("file path", head

Re: [R] Confidence bands in ggplot2

2011-07-07 Thread Abhijit Dasgupta
;red')+... On Jul 7, 2011, at 6:16 PM, Christopher Desjardins wrote: > Thanks that worked perfectly. One thing if I may. Is it possible to make the > center dot red and the lines connecting the dots black? > > Thanks, > Chris > > > On Jul 7, 2011, at 5:10 PM, Abhijit

Re: [R] nice report generator?

2011-12-07 Thread Abhijit Dasgupta
Sarah Goslee might want to chime in, but using odfWeave and appropriate LibreOffice templates, you can generate beautifully formatted tables, possibly in the style you wish, in LibreOffice, as well as add R figures. The R2wd package (which has a proprietary component) will also generate tables

Re: [R] How to turn a LaTeX Sweave file (Rnw) into .HTML/.odf/.docx? (under windows)

2011-09-22 Thread Abhijit Dasgupta
So, I was playing around a bit on my Mac LyX can do Sweave (see http://wiki.lyx.org/LyX/LyxWithRThroughSweave), and will actually output HTML or ODT. However, on a cursory pass, I couldn't get the graphics to translate, since the Sweave driver translates the graphics as .ps or .pdf files,

Re: [R] Proc Mixed to R

2011-10-28 Thread Abhijit Dasgupta
You need to use either the lme4 or nlme packages for mixed models. (There are some other possibilities as well). See http://glmm.wikidot.com/faq for MUCH more detail On 10/27/2011 7:19 PM, Molly Hanlon wrote: > Hi All, > > I'm working with some SAS code to analyze an experiment set up as follows

Re: [R] R + Linux

2008-06-06 Thread Abhijit Dasgupta
I've had R on an Ubuntu system for about 18 months now, and getting R up and running was a breeze. (I didn't realize it earlier, but Dirk certainly gets my vote of thanks for his efforts in making this process as easy as it is). Specially in terms of dependencies and the like, the Ubuntu packa

Re: [R] favorite useful tools?

2008-06-07 Thread Abhijit Dasgupta
The two sets of packages I use a lot for their utility functions and for making my day-to-day analysis and reporting easier are Hmisc and Design by Frank Harrell and {gdata,gmodels,gplots} by Greg Warnes. Frank's packages have good documentation and cover a pretty good range of regression metho

Re: [R] Usefulness of "scale" function

2008-06-07 Thread Abhijit Dasgupta
Type ?scale in R for the answer :) Gundala Viswanath wrote: Hi all, I found this snippet in a gene expression clustering code. __BEGIN__ temp <- readLines("GSE1110_series_matrix.txt"); cat(temp[-grep("^!|^\"$", temp)], file="GSE1110clean.txt", sep="\n"); mydata <- read.delim("GSE1110clean.txt"

Re: [R] A curious bug in read.xls

2008-06-10 Thread Abhijit Dasgupta
I believe read.xls has a colClasses argument. If you import using read.xls(filename, colClasses='character') everything will be imported as a string, and you can re-convert after importing Alberto Monteiro wrote: I found a curious bug in read.xls. I don't know if it's reproducible. It's like

Re: [R] shell command

2008-06-12 Thread Abhijit Dasgupta
Yes, see ?system samitj wrote: Hi, Can we execute a unix shell command from within R shell? thanks, Sam __ 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/post

Re: [R] Problem in Binning of a data set

2008-06-18 Thread Abhijit Dasgupta
One issue you will have is that, if you're using the same cutpoints for the binning for all three tables, you'll probably get different numbers of values from each column in each bin, so you won't be able to form a "matrix". Of course, I might be misunderstanding what you mean by "binning" :)

Re: [R] how to extract object from stats test output (cor.test)?

2008-06-19 Thread Abhijit Dasgupta
preciated. > > > Thanks, > Patrick > > [[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

Re: [R] get formatted regression output

2008-07-02 Thread Abhijit Dasgupta
library(Hmisc) has latex and html functions to convert the output into latex (then to pdf, if you wish), and into html. A useful link for this is http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/SweaveConvert Bunny, lautloscrew.com wrote: Hi everybody, I have a simple regression summary

Re: [R] apply with a division

2008-07-03 Thread Abhijit Dasgupta
Won't scale(x,center=F, scale=x[1,]) do the trick? -- Abhijit Quoting Gabor Grothendieck <[EMAIL PROTECTED]>: > This should work whether your data, x, is a data frame or a matrix: > > x / x[rep(1, nrow(x)),] > > > On Thu, Jul 3, 2008 at 6:04 PM, Greg Kettler <[EMAIL PROTECTED]> wrote: >> Hi, >

[R] OdfWeave and contingency tables

2008-03-26 Thread Abhijit Dasgupta
Hi, I would like to use odfWeave to output some contingency tables (the output of "table") into OOo. I know I can do this in LaTex (using "latex" in the Hmisc package), but I was wondering if it is possible in OdfWeave. My documentation to odfTable says inputs can only be vector, matrix or dat

Re: [R] Recode factors

2008-03-27 Thread Abhijit Dasgupta
Another suggestion is: blah = as.character(aa) blah=gsub('[a-z]','0',blah,ignore.case=T) aa = as.factor(blah) I've found changing factors to characters rather than numeric is generally safer. Abhijit Doran, Harold wrote: > Perfect. My headache is gone. Thanks. > > >> -Original Message-

Re: [R] Sweave - print \n ?

2008-03-28 Thread Abhijit Dasgupta
you haven't escaped the \ for the \n, I think. Your line should be cat("\\hline \\n"). You did escape the \ for hline, though. Abhijit Dasgupta, Ph.D Assistant Professor | Division of Biostatistics Dept of Pharmacology and Experimental Therapeutics | Thomas Jefferson University 1

Re: [R] vectorized way to combine levels of a factor

2008-04-09 Thread Abhijit Dasgupta
you'll love Flexicon, a game which > comb[[elided Hotmail spam]] > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting g

Re: [R] Skipping specified rows in scan or read.table

2008-04-10 Thread Abhijit Dasgupta
Hi Ravi, One thing I tend to do is, when using read.table, specify the option 'colClasses='character''. This forces everything to be read as a character. From there, as.numeric works fine, and you don't have to deal with factors and reconverting them. Hope this helps Abhijit Ravi Varadhan wro

Re: [R] Ubuntu vs. Windows

2008-04-22 Thread Abhijit Dasgupta
My naive understanding of this (I switched to Ubuntu a year ago from WinXP for similar reasons) is that Ubuntu as an OS uses less memory than WinXP, thus leaving more memory for computation, swap space, etc. In other words, Ubuntu is "lighter" than XP on system resources. Abhijit Doran, Harold

Re: [R] a simple question of importing data

2008-04-24 Thread Abhijit Dasgupta
Or you could use the read.xls program in the gdata library that uses a perl script underneath. Charles Danko wrote: > try: > var <- read.table("weekly.txt", sep="\t", header=TRUE) > > Charles > > On Thu, Apr 24, 2008 at 3:29 PM, tzsmile <[EMAIL PROTECTED]> wrote: > >> i just want to read data

Re: [R] howto import .xls and .ods

2008-05-01 Thread Abhijit Dasgupta
perl function underneath. Abhijit Dasgupta, Ph.D Assistant Professor | Division of Biostatistics Dept of Pharmacology and Experimental Therapeutics | Thomas Jefferson University 1015 Chestnut St | Suite M100 | Philadelphia PA 19107 Ph: (215) 503-9201 | Fax: (215) 503-3804 adasgupt (at) mail (dot

Re: [R] CRAN and Multiple Linear Regression

2008-05-07 Thread Abhijit Dasgupta
Multiple linear regression is handled by the function lm() in the default installation of R. This takes inputs as lm(y~x1+x2+x3). If you're going to be using R regularly, there are several books which cover the basic statistical analyses available in R (and then some), including those by Peter

Re: [R] anova p value extraction

2008-05-07 Thread Abhijit Dasgupta
of" > >>> attr(summary(pb), "Pr(>F)") > >> NULL > >> > >> __ > >> 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. > > > > > > [[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/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Abhijit Dasgupta __ 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] Can R handle large dataset?

2008-05-14 Thread Abhijit Dasgupta
I believe this is determined by how much memory your computer has, not particularly by R itself. Mingjun Huang wrote: Hello, I am new to R, can anyone give me an idea of how R handle a large dataset (e.g. couple of Gbytes)? Thanks a lot! Best, Mingjun ___

Re: [R] Newbie question about vector matrix multiplication

2008-05-14 Thread Abhijit Dasgupta
Won't diag(w)%*%co%*%diag(w) do it? Dan Stanger wrote: Hello All, I have a covariance matrix, generated by read.table, and cov: co<-cov(read.table("c:/r.x")) XYZ X 0.0012517684 0.0002765438 0.0007887114 Y 0.0002765438 0.0002570286 0.0002117336 Z 0.00078

Re: [R] How to swap and rearrange rows?

2008-05-16 Thread Abhijit Dasgupta
Another possibility: # Generate the months in sequential order: m <- months(seq(as.Date('2000/1/1'), by='month',length=12),abbreviate=T) # Concatenate the data est=rbind(est31,est30,est28) # generate the right order ind <- match(substr(rownames(est),1,3),m) # reorder the rows est <- est[ind,] BTW,

Re: [R] Correlated Columns in data frame

2008-05-17 Thread Abhijit Dasgupta
The line in question randomly decides which of the two correlated columns to drop. If C1 and C2 are correlated you could drop either one, the code decides which randomly, which is a principled way to do this. This does mean that repeated runs of this code will give you different results, but th

Re: [R] Creating publication-quality plots for use in Microsoft Word

2010-09-15 Thread Abhijit Dasgupta, PhD
ty 300x300 fig1.pdf fig1.png") -- Abhijit Dasgupta, PhD Director and Principal Statistician ARAASTAT Ph: 301.385.3067 E: adasgu...@araastat.com W: http://www.araastat.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] aggregate, by, *apply

2010-09-15 Thread Abhijit Dasgupta, PhD
ermine how 'm' relates to 'x$y'. Any tips/guidance is appreciated. Mark T. W. Ebbert __ 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

Re: [R] speeding up regressions using ddply

2010-09-22 Thread Abhijit Dasgupta, PhD
____ 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. -- Abhijit Dasgupta, PhD Director and Principal Statistician A

Re: [R] R Code for paper?

2010-09-30 Thread Abhijit Dasgupta, PhD
Look at the "qvalue" package by Dabney and Storey, which might satisfy your last query On 09/30/2010 06:40 PM, Jim Silverton wrote: Does anyone has the Rcode for Gilbert's 2005 paper on the discrete FDR and Tarone's 1990 paper? And Storey's pFDR?

Re: [R] R Code for paper?

2010-09-30 Thread Abhijit Dasgupta, PhD
Reading Gilbert's paper and references, and going on the web, I see that Gilbert provided Fortran source code for his method as well as Tarone's method. It might be possible to wrap this in R On 09/30/2010 06:40 PM, Jim Silverton wrote: Does anyone has the Rcode for Gilbert's 2005 paper on th

Re: [R] Creating R objects in Java

2010-10-01 Thread Abhijit Dasgupta, PhD
On 10/1/10 9:18 AM, lord12 wrote: How do you call R methods from Java? I want to create a GUI using Swing in Jaa that calls R methods in Java. Look in the documentation for the rJava package -- Abhijit Dasgupta, PhD Director and Principal Statistician ARAASTAT Ph: 301.385.3067 E: adasgu

Re: [R] Programmaticly finding number of processors by R code

2010-10-03 Thread Abhijit Dasgupta, PhD
gt; > __ > 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] How to extract se(coef) from cph?

2010-08-05 Thread Abhijit Dasgupta, PhD
]] __ 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. -- Abhijit Dasgupta, PhD Director and Principal Statistician

Re: [R] How to apply apply?!

2010-08-06 Thread Abhijit Dasgupta, PhD
LEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Abhijit Dasgupta, PhD Director and Principal Statistician ARAASTAT Ph: 301.385.3067 E: adasgu...@araastat.com W: http://www

Re: [R] How to remove rows based on frequency of factor and then difference date scores

2010-08-24 Thread Abhijit Dasgupta, PhD
. Many thanks, Chris Beeley, Institute of Mental Health, UK __ 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-cont

Re: [R] How to remove rows based on frequency of factor and then difference date scores

2010-08-24 Thread Abhijit Dasgupta, PhD
ed, minimal, self-contained, reproducible code. David Winsemius, MD West Hartford, CT __ 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] How to remove rows based on frequency of factor and then difference date scores

2010-08-24 Thread Abhijit Dasgupta, PhD
The paste-y argument is my usual trick in these situations. I forget that tapply can take multiple ordering arguments :) Abhijit On 08/24/2010 02:17 PM, David Winsemius wrote: On Aug 24, 2010, at 1:59 PM, Abhijit Dasgupta, PhD wrote: The only problem with this is that Chris's u

Re: [R] ggplot inside cycle

2010-08-26 Thread Abhijit Dasgupta, PhD
You haven't wrapped p in the print command, which is one of the ways to make sure the plot gets printed when we need it. print(p+geom_point(aes(size=3))) does the trick On 08/26/2010 06:08 AM, Petr PIKAL wrote: Dear all I want to save several ggplots in one pdf document. I tried this for (i

Re: [R] Something similar to layout in lattice or ggplot

2010-09-07 Thread Abhijit Dasgupta, PhD
not data. ~ Roger Brinner The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey -Oorspronkelijk bericht- Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.o

Re: [R] Something similar to layout in lattice or ggplot

2010-09-07 Thread Abhijit Dasgupta, PhD
- Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens Abhijit Dasgupta Verzonden: dinsdag 7 september 2010 16:38 Aan: r-help@r-project.org Onderwerp: [R] Something similar to layout in lattice or ggplot Hi, Is there a function similar to the layout function in base gra

Re: [R] Saving/loading custom R scripts

2010-09-08 Thread Abhijit Dasgupta, PhD
uld be nice not to have to 'copy and paste' it into R on every startup: http://www.r-statistics.com/wp-content/uploads/2010/02/Friedman-Test-with-Post-Hoc.r.txt This would be for Ubuntu, if that makes any difference. Cheers -- Abhijit Dasgupta, PhD Director and Principal St

Re: [R] Revolution Analytics reading SAS datasets

2011-02-11 Thread Abhijit Dasgupta, PhD
I'm sure the legal ground is tricky. However, OpenOffice and LibreOffice and KWord have been able to open the (proprietary) MS Word doc format for a while now, and they are open source (and Libre Office might even be GPL'd), so the algorithm is in fact "published" in Jeremy's sense, and has b

Re: [R] linear regression in a data.frame using recast -- A fortunes candidate??

2011-03-16 Thread Abhijit Dasgupta, PhD
Seconded On 03/16/2011 05:37 PM, Bert Gunter wrote: Ha! -- A fortunes candidate? -- Bert If this is really a time series, then you will have serious validity problems due to auto-correlation among non-independent units. (But if you are just searching for a way to pull the wool over the eyes of

Re: [R] Confidence bands in ggplot2

2011-07-07 Thread Abhijit Dasgupta, PhD
You can easily do this by: qplot(x=as.factor(sch),y=est, geom='point', colour='red') + geom_pointrange(aes(x=as.factor(sch), y=est, ymin=lower.95ci, ymax=upper.95ci))+ xlab('School') + ylab("Value-added")+theme_bw() On 07/07/2011 05:55 PM, Christopher Desjardins wrote: Hi, I have the followi

Re: [R] Storing and managing custom R functions for re-use

2011-07-09 Thread Abhijit Dasgupta, PhD
I think most of us are in a similar situation. I've usually kept mine in a file which is sourced when I start R. The main problem I have with this is that it clutters up my environment with a lot of stuff I don't need all the time. I'm in the process of creating a custom package which will be l