[R] Stratified weighted statistics

2007-08-29 Thread Vikas Rawal
incomes of persons in different towns along with weights to be given for each sampled person. How will I compute weighted statistics for each town? Vikas Rawal JNU, New Delhi. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] Stratified weighted statistics

2007-08-29 Thread Vikas Rawal
Please look again at the help files for summarize and wtd.mean which show how to do this. This is from the summarize help file: FUN: a function of a single vector argument, used to create the statistical summaries for 'summarize'. 'FUN' may compute any number of

[R] help with using grid to modify ggplot/lattice plots

2007-06-05 Thread Vikas Rawal
use of grid to modify lattice graphics may also be useful. I have gone through vignettes in the grid package but am somehow not able to understand the overall approach. It would be useful if there is something more specific that deals with using grid to modify such graphics. Vikas Rawal Associate

Re: [R] Suggestions for statistical computing course

2007-04-23 Thread Vikas Rawal
2. I do most of my work in R using Emacs and ESS. That means that I keep a file in an emacs window and I submit it to R one line at a time or one region at a time, making corrections and iterating as needed. When I am done, I just save the file with the last, working, correct

Re: [R] Labelling boxplot with fivenumber summary

2007-04-09 Thread Vikas Rawal
A function that uses ggplot package to make annotated boxplots is described at http://vikasrawal.wordpress.com/2007/02/25/working-with-ggplot/ An advantage of using ggplot is that you can plot weighted boxplots. Vikas Rawal Associate Professor Centre for Economic Studies and Planning Jawaharlal

Re: [R] problem with installation of packages

2007-03-27 Thread Vikas Rawal
Dear Professor Ripley, Your diagnosis was absolutely right and I have been able to solve my problem. I had looked up the archives and R Faq for similar problems before posting, but they all pertained to windows. In fact you had replied to the posts pointing to RW Faq. But these all pertained to

[R] problems with installation of packages

2007-03-26 Thread Vikas Rawal
I am having a peculiar problem with installation of packages. I am trying to install the package maptools. This is what I get. install.packages(maptools,depend=T) Warning in install.packages(maptools, depend = T) : argument 'lib' is missing: using /usr/local/lib/R/site-library Warning:

Re: [R] Boxplot: quartiles/outliers

2007-02-14 Thread Vikas Rawal
I am not sure why you would want to do this, and a 'box and whiskers plot' was pretty closely defined by the original authors so R does not allow options for forms they did not consider. I was wondering who the original authors were? Would be interested in looking up their description.

Re: [R] Boxplot: quartiles/outliers

2007-02-14 Thread Vikas Rawal
I am not sure why you would want to do this, and a 'box and whiskers plot' was pretty closely defined by the original authors so R does not allow options for forms they did not consider. I was wondering who the original authors were? Would be interested in looking up their

Re: [R] boxplot statistics in ggplot

2007-02-08 Thread Vikas Rawal
distinct. Hadley On 2/7/07, Vikas Rawal [EMAIL PROTECTED] wrote: I need to make weighted boxplots. I found that ggplot makes them. I would however like to label them with the boxplot statistics (the median, q1 and q3). In the boxplot function in r-base, I could output boxplot statistics

Re: [R] boxplot statistics in ggplot

2007-02-07 Thread Vikas Rawal
How can I superimpose some text labels on ggplot? I could get weighted quantiles using wtd.quantiles function in Hmisc package. But I can't plot these as labels on the boxplot. My code is as follows. list(c(1:3),c(1:3),c(1:3))-t library(Hmisc) for (i in 1:3) {

Re: [R] boxplot statistics in ggplot

2007-02-07 Thread Vikas Rawal
Hi, Let me first congratulate you for having written the reshape package. It is very nice and I use it all the time. I wish the documentation was a bit easier. It took me quite some time to find my way through it!! But once I got the hang of how it worked, I just loved it. With ggplot, this is

[R] boxplot statistics in ggplot

2007-02-06 Thread Vikas Rawal
I need to make weighted boxplots. I found that ggplot makes them. I would however like to label them with the boxplot statistics (the median, q1 and q3). In the boxplot function in r-base, I could output boxplot statistics and then write a text on the plot to place the labels. How would one do it

[R] html/rtf formatted output

2006-11-05 Thread Vikas Rawal
I would like to tabulate summaries of data generated using aggregate function. The task needs to be done in two steps. First, reshape a data frame (or output of aggregate function) into a desirable form. This could typically have multiple levels of column and row headers, numbers in the cells.

[R] Compiling R packages on Ubuntu

2006-10-31 Thread Vikas Rawal
I am unable to compile R packages from source on Ubuntu dapper/edgy. Does anybody have an experience? When I do install.packages(nlme,depend=TRUE), I get following error messages. Can someone help? I get similar messages for any package I try to compile. VR - * Installing

[R] Emacs and ESS installation issues in Windows

2005-02-11 Thread Vikas Rawal
the path to R/bin is specified in the path. Is there some other way of defining the path to R. There must be some lisp file which one can modify. Can somebody enlighten me on this as well. Thanks, Vikas Rawal __ R-help@stat.math.ethz.ch mailing list https

[R] Installing R packages in windows

2005-02-04 Thread Vikas Rawal
I need to install a selected set of packages on a number of machines (in a computer lab). Some of these machines are not connected to internet. Is it possible to download all the packages and make a kind of repository on a CD, and then install.packages from the CD? Vikas

Re: Re: [R] Installing R packages in windows

2005-02-04 Thread Vikas Rawal
Thank you. That is useful. But is it possible to download all the packages in one go, or would one have download each one by one? Vikas -Original Message- From: Uwe Ligges [EMAIL PROTECTED] To: Vikas Rawal [EMAIL PROTECTED] Date: Fri, 04 Feb 2005 13:55:42 +0100 Subject: Re: [R

[R] Matrix multiplication in R is inaccurate!!

2005-01-27 Thread Vikas Rawal
If you multiply a matrix by its inverse you should get an identity matrix. In R, you get an answer that is accurate up to about 16 decimal points? Why can't one get a perfect answer? See for example: c(5,3)-x1 c(3,2)-x2 cbind(x1,x2)-x solve(x)-y x%*%y Vikas Rawal

[R] Problems with merge

2004-10-05 Thread Vikas Rawal
This issue has been discussed on this list before but the solutions offerred are not satisfactory. So I thought I shall raise it again. I want to merge two datasets which have three common variables. These variables DO NOT have the same names in both the files. In addition, there are two

Re: [R] Reading multiple files into R

2004-10-02 Thread Vikas Rawal
can read them individually. What do you think could be the problem? Vikas Kevin Bartz wrote: Roger Bivand wrote: On Fri, 1 Oct 2004, Vikas Rawal wrote: I want to read data from a number of files into R. Reading individual files one by one requires writing enormous amount of code that will look

Re: [R] Reading multiple files into R

2004-10-02 Thread Vikas Rawal
I progressed when I combined the Kevin-Roger method with the Jomes-holtman method. sprintf() in place of formatC did the trick. Holtman's method does not work because of some problem with the assign. It seems you cannot have a variable target of the assignment. Now I have a vector of lists

[R] Reading multiple files into R

2004-10-01 Thread Vikas Rawal
I want to read data from a number of files into R. Reading individual files one by one requires writing enormous amount of code that will look something like the following. maptools:::dbf.read(wb-01vc.dbf)-dist1 maptools:::dbf.read(wb-02vc.dbf)-dist2

[R] add-on packages

2004-09-28 Thread Vikas Rawal
I want to add RMySQL and RODBC packages to my R installation on redhat linux box. The command install.packages gives following output. What could be wrong? install.packages(RMySQL) trying URL `http://cran.r-project.org/src/contrib/PACKAGES' Content type `text/plain;

Re: [R] add-on packages

2004-09-28 Thread Vikas Rawal
Thanks. That was simple. Vikas Witold Eryk Wolski wrote: Hi! install.packages(RMySQL) ^ ^ note the parenthesis /E Vikas Rawal wrote: I want to add RMySQL and RODBC packages to my R installation on redhat linux box. The command install.packages gives following

[R] read dbf files into R

2004-09-28 Thread Vikas Rawal
I run R on redhat linux. What would be the easiest way to read dbf files into R? Vikas __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] Re: read dbf files into R

2004-09-28 Thread Vikas Rawal
Is there a linux-based/free command line tool for converting dbf files into txt? Conceptually, it is not a great way of doing things. We have a dbf file with a well defined structure. We convert it into a text file, which has a loose structure, undefined variables types etc. And then we read

Re: [R] read dbf files into R

2004-09-28 Thread Vikas Rawal
It looks like there is no free dbf driver for unixodbc. Vikas [EMAIL PROTECTED] wrote: Have you checkout out R Data Import / Export? In particular, check out RODBC developed by Brian Ripley and Michael Lapsley. HTH, Partha Vikas Rawal [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 09/28/2004 07

[R] Test of significance in estimation of correlation coefficients

2004-08-24 Thread Vikas Rawal
I estimated spearman's correlation coefficient using cor(). How do I test for significance? Vikas __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!