[R] Demographic Analytics in R

2013-08-06 Thread Ray DiGiacomo, Jr.
Hello All, The Orange County R User Group (OC-RUG) will host a free webinar with M.I.T on August 29 to debut the new "acs" R package for demographic analytics. Registration is at: https://www3.gotomeeting.com/register/730429166 Best Regards, The Orange County R User Group [[alternativ

[R] Problem when running an SVAR-AB model in vars package

2013-08-06 Thread jpm miao
Is "B" a reserve word in vars package? I tried to run an SVAR-AB model by SVAR function and find the IRF in vars package. The problem is that when B matrix is named by "B", an error message occurs. However, if the same matrix is named by "Bm", then things run smoothly. What's wrong? Is "B" a rese

Re: [R] descriptive stats by cells in factorial design

2013-08-06 Thread David Winsemius
On Aug 6, 2013, at 4:02 PM, Mike Miller wrote: > I received two additional suggestions, one off-list, both appended below. > Both helped me to learn a bit more about how to get what I want. > > First, the aggregate() function is in package:stats, it provides the numbers > I needed, but I don't

Re: [R] descriptive stats by cells in factorial design

2013-08-06 Thread Mike Miller
I received two additional suggestions, one off-list, both appended below. Both helped me to learn a bit more about how to get what I want. First, the aggregate() function is in package:stats, it provides the numbers I needed, but I don't like the output format as much as I liked the format fro

Re: [R] How to retrieve pairwise distances between clusters after cutting the tree?

2013-08-06 Thread David Carlson
Assuming you are defining "distance between clusters" as the distance between the centroids and you have the original data, you can use aggregate() on the original data with the output from cutree() as the grouping variable to create a new data.frame of cluster centers (means). Then just run that t

Re: [R] R plot

2013-08-06 Thread Guanrao Chen
Try extract the individual frames first ... Thanks, Guanrao http://www.foundyo.com From: Mª Teresa Martinez Soriano To: "r-help@r-project.org" Sent: Tuesday, August 6, 2013 3:43 AM Subject: [R] R plot Hi to everyone, first of all, thanks hor this excellen

Re: [R] Problem with t-test

2013-08-06 Thread arun
Hi Vivek, I removed the rows with missing values and also duplicated rows.  Now, it looks like it is working. x<-read.table("RP_matrix_FPKM_PGTvsPDGT.txt",header=T,sep="\t") x1<- read.table("RP_plaise_FPKM_PGTvsPDGT.txt",header=T,sep="\t") str(x1) #'data.frame':    19680 obs. of  6 variables:

[R] odfWeave post processing error

2013-08-06 Thread Maverick topgun
Hello all. When I attempt to run the following script, I receive a post processing error message. I would appreciate any help in interpreting and correcting the error. Script: library(odfWeave) ctrl <- odfWeaveControl(zipCmd = c("\"C:\\Program Files\\7-Zip\\7z.exe\" a $$file$$", "\"C:\\Program

Re: [R] algorithm for clustering categorical data

2013-08-06 Thread Li, Yan
Thanks for the reply... For some reason, I need to keep Euclidean distance in the process... -Original Message- From: Martin Maechler [mailto:maech...@stat.math.ethz.ch] Sent: Tuesday, August 06, 2013 12:04 PM To: dcarl...@tamu.edu Cc: Li, Yan; r-help@r-project.org Subject: Re: [R] algor

Re: [R] algorithm for clustering categorical data

2013-08-06 Thread Li, Yan
Thanks David, This is very useful! -Original Message- From: David Carlson [mailto:dcarl...@tamu.edu] Sent: Tuesday, August 06, 2013 11:27 AM To: Li, Yan; r-help@r-project.org Subject: RE: [R] algorithm for clustering categorical data What do you mean by representing the categorical field

Re: [R] Horizontal bar plot for lengthy data

2013-08-06 Thread Christofer Bogaso
Hello Jim, Thanks for your pointer. Could you be more specific how I can implement your strategy? Thanks and regards, On Tue, Aug 6, 2013 at 2:49 PM, Jim Lemon wrote: > On 08/06/2013 07:01 AM, Christofer Bogaso wrote: > >> Hi David, >> >> Thanks for your answer. >> >> However I was thinking i

Re: [R] help.start

2013-08-06 Thread Witold E Wolski
Dear Martin I mean R version 3.0.1 (2013-05-16) -- "Good Sport" On 6 August 2013 16:55, Martin Maechler wrote: >> Witold E Wolski >> on Tue, 6 Aug 2013 16:40:42 +0200 writes: > > > Does anyone also observes with R 3.1 (on linux) that the help.start > > there's no R 3.1 . What d

[R] How to retrieve pairwise distances between clusters after cutting the tree?

2013-08-06 Thread Naxerova, Kamila
Dear all, what would be the best way of retrieving distances between individual clusters after cutting my tree of interest? $height from the hclust object will give me the distance between clusters at a each agglomeration step, but let's say I have a situation where I have six observations A, B

Re: [R] lattice yscale.components: use multiple convenience functions

2013-08-06 Thread David Winsemius
On Aug 6, 2013, at 9:09 AM, Taylor, Sean D wrote: > Good morning, > > I really enjoy some of the recent convenience functions in lattice_0.20-15 > and latticeExtra_0.6-24. I am wondering if there is a way to use multiple > functions in the same call? Specifically, I would like to be able to us

Re: [R] problem with mahal function Package dismo

2013-08-06 Thread David Carlson
It appears that you are trying to pass a data.frame to the function and it is complaining. You didn't give us enough information to know for sure (e.g. str(predictor) and str(Cfin)), but you could try mm<-mahal (as.matrix(predictor), as.matrix(Cfin)) - David L

[R] Structural equation models (SEM) for count data / poisson distribution

2013-08-06 Thread Stella Copeland
Dear R community, I am constructing structural equation models in R and I have tried both the sem and lavaan packages. I have count data (numbers of plants in this case) that I would like to use as an endogenous variable. The poisson distribution seems appropriate for these data, but I can't s

[R] lattice yscale.components: use multiple convenience functions

2013-08-06 Thread Taylor, Sean D
Good morning, I really enjoy some of the recent convenience functions in lattice_0.20-15 and latticeExtra_0.6-24. I am wondering if there is a way to use multiple functions in the same call? Specifically, I would like to be able to use yscale.components.log10ticks (to get the major tick marks a

[R] Temporal Correlation in Logistic Regression

2013-08-06 Thread Worthington, Thomas A
I am attempting to create a logistic regression model to examine the factors that determine the emergence of four species of aquatic invertebrates. The invertebrates were trapped at two sites over a period of two years. The traps were emptied on an irregular spaced basis (with an extended gap ov

[R] R help

2013-08-06 Thread Mª Teresa Martinez Soriano
Hi everyone, I'm sorry for my questions, I'm sure they are totally stupig, but I am completely new in this program and I am facing this "danger" alone I have done imputation for one part of my data set, however I am not able for doing in general. this is part of my data set (cast2) cast2[1:30

[R] laf_open_fwf

2013-08-06 Thread christian.kamenik
Dear all I was trying the (fairly new) LaF package, and came across the following problem: I opened a connection to a fixed width ASCII file using laf_open_fwf(my.filename, my.column_types, my.column_widths, my.column_names) When looking at the data, it turned out that \n (newline) and \r (carr

Re: [R] problem with mahal function Package dismo

2013-08-06 Thread Ernesto Villarino
Hi all, I want to apply mahal function using data.frame instead of raster data but I am having problems (see error message below). I want to use data.frame since we have seasonal data (the species distribute differently as a function of months). > head (predictor) OCPT x1XM z

Re: [R] creating a quantile variable based on subsets of a dataframe

2013-08-06 Thread David Winsemius
On Aug 6, 2013, at 10:17 AM, Gavin Rudge wrote: > #some sample data: > library(Hmisc) > set.seed(33) > df<-data.frame(x=(sample(letters[1:10],1000,replace=TRUE)),y=rnorm(1000,mean=20,sd=15)) > > x is a category from a to J, say a geographical area, into which an > observation y falls, y being a

[R] creating a quantile variable based on subsets of a dataframe

2013-08-06 Thread Gavin Rudge
#some sample data: library(Hmisc) set.seed(33) df<-data.frame(x=(sample(letters[1:10],1000,replace=TRUE)),y=rnorm(1000,mean=20,sd=15)) x is a category from a to J, say a geographical area, into which an observation y falls, y being a score. Now if I want to put my score into quantiles (quintile

Re: [R] algorithm for clustering categorical data

2013-08-06 Thread Martin Maechler
> "DC" == David Carlson > on Tue, 6 Aug 2013 10:26:56 -0500 writes: > What do you mean by representing the categorical fields by 1:k? > a <- c("red", "green", "blue", "orange", "yellow") > becomes > a <- c(1, 2, 3, 4, 5) > That guarantees your results are worthl

Re: [R] algorithm for clustering categorical data

2013-08-06 Thread David Carlson
What do you mean by representing the categorical fields by 1:k? a <- c("red", "green", "blue", "orange", "yellow") becomes a <- c(1, 2, 3, 4, 5) That guarantees your results are worthless unless your categories have an inherent order (e.g. tiny, small, medium, big, giant). Otherwise it should b

Re: [R] help.start

2013-08-06 Thread Martin Maechler
> Witold E Wolski > on Tue, 6 Aug 2013 16:40:42 +0200 writes: > Does anyone also observes with R 3.1 (on linux) that the help.start there's no R 3.1 . What do you mean really? R 3.0.1 ? or do you mean the current "R under development" which (quite rarely) also shows as 3.1.0 a

[R] help.start

2013-08-06 Thread Witold E Wolski
Does anyone also observes with R 3.1 (on linux) that the help.start function frequently blocks the R session (never returns) ? Can I do anything or just waith for R3.1.1? -- Witold Eryk Wolski __ R-help@r-project.org mailing list https://stat.ethz.c

Re: [R] algorithm for clustering categorical data

2013-08-06 Thread Li, Yan
H David and other R helpers, If I rescale the numerical fields to [0,1] and represent the categorical fields to 1:k, which is the same starting point as Gower's measure, but I use Euclidean distance instead of Gower's distance to do k-means clustering. How much is the difference? What is the dr

Re: [R] Distribution Fitting with R

2013-08-06 Thread S Ellison
> I want to actually fit a formal > statistical distribution to my data using the classical > methodologies (either Shapiro Wilk, Anderson Darling, > Chi-Square, etc.). You probably need to go find out what those things do. Two of them are tests for normality, not fitting methods or distribut

Re: [R] breaks argument in heatmap.2 doesn't do what it should I think

2013-08-06 Thread Adams, Jean
If you look at the help for heatmap.2 (in the gplots package) you will see the following explanation for breaks # mapping data to colors breaks, symbreaks=min(x < 0, na.rm=TRUE) || scale!="none", If you run your code with the second call to the heatmap.2() functio

[R] model.frame.default variable length differ in coxph

2013-08-06 Thread E Joffe
Hello, I am trying to run a coxph model but get an error Error in model.frame.default(formula = Surv(time, status) ~ selectedVarnames, : variable lengths differ (found for 'selectedVarnames') Of note the dataset is generated as part of using the glmnet for Lasso regularization. Glm

[R] breaks argument in heatmap.2 doesn't do what it should I think

2013-08-06 Thread Witold E Wolski
I do set the breaks parameter in heatmap.2 I would expect that the color.key and the histogram (the thing in the top left of the plot) are aligned. Just that everyone can reproduce the problem: mypalette<-brewer.pal(11,"RdYlBu") ddd <- rnorm(400,0,0.1) mdd <- matrix(ddd,ncol=50) hm <- heatmap.2(m

Re: [R] R plot

2013-08-06 Thread Jose Iparraguirre
Hola Maria Teresa! I'd need some data to fully understand your problem, but as far as I can tell you are overdoing things. Again, without the data I can't help you but I'd use the ggplot2 package and forget about splitting the data into vectors and thus creating additional objects which look re

[R] read.table.ffdf and fixed width files

2013-08-06 Thread christian.kamenik
Dear all I am working on Windows 7 32-bit, and the ff- package is my daily life-saver to overcome the inherent memory limitations. Recently, I tried using read.table.ffdf to import data from a fixed-width ASCII file (file size: 1'440'865'015 Bytes) with 6'079'455 lines and 32 variables using th

[R] R plot

2013-08-06 Thread Mª Teresa Martinez Soriano
Hi to everyone, first of all, thanks hor this excellent service. I have a doubt in R, it looks like: I want to get a plot of my data.frame, but I have used the funtion split in this data.frame and I don't know if there exist some function which could help me, I was using for loop. The problem

Re: [R] problem installing RDCOMClient on Windows 7

2013-08-06 Thread Kishor Tappita
Dear Uwe, Thank you for your repsonse. I installed the latest version of R (R-3.0.1) . I get the below errors when I try to install RDCOMClient. g++ -m32 -I"D:/R-3.0.1/include" -DNDEBUG -D_GNU_ -DNO_PYCOM_IPROVIDECLASSINFO - .-I"d:/RCompile/CRANpkg/extralibs64/local/include" -Wno-deprecated

Re: [R] Compiling a C++ file in RStudio?

2013-08-06 Thread Berend Hasselman
On 06-08-2013, at 11:14, jpm miao wrote: > Hi, > > I am wondering if C++ programs could be compiled in RStudio. I search on > the web, and I find many yes's and no's. It looks like Rcpp can do it (or > partially?). I just wonder if it can replace the C++ IDE, e.g., Eclipse or > Visual Studio

[R] Compiling a C++ file in RStudio?

2013-08-06 Thread jpm miao
Hi, I am wondering if C++ programs could be compiled in RStudio. I search on the web, and I find many yes's and no's. It looks like Rcpp can do it (or partially?). I just wonder if it can replace the C++ IDE, e.g., Eclipse or Visual Studio since RStudio is much easier to use. One says yes:

Re: [R] Horizontal bar plot for lengthy data

2013-08-06 Thread Jim Lemon
On 08/06/2013 07:01 AM, Christofer Bogaso wrote: Hi David, Thanks for your answer. However I was thinking if it would be possible to have the Vertical-scroll bar, so that user can scroll his screen while still having all the bars on the plot clearly. Is there any possibility? Hi Christofer,

Re: [R] timereg

2013-08-06 Thread Uwe Ligges
On 05.08.2013 20:27, Silvano wrote: Hi, I tried to fit a model using a timecox function in R version 3.0.0, using sTRACE data present in survival package. If I use the 2.9.0 version, I don't have problems, but in 3.0.0 version, I get the following error message: out <- timecox(Surv(time/36

[R] MDA

2013-08-06 Thread Tjun Kiat Teo
I am trying to use the package mda And this is my command mdfit<-mda(factor(forsen[,f]) ~ .,data=forsen[,-f],subclasses=sc) But I keep getting this error message on a particular data set Error in maxdist[l] <- x[l, i] : NAs are not allowed in subscripted assignments Can anyone help ? Thanks

Re: [R] cannot base64decode string which is base64encode in R

2013-08-06 Thread Prof Brian Ripley
On 06/08/2013 08:34, Qiang Wang wrote: Thanks for your Elaborative explanation. If I'm understanding correct. "ߟ" belongs to those characters that CAN be interpreted by UTF-8. Others are left as they are, such as, "\xe4" and "\xac". So the following code will show an error message, but it won't

Re: [R] cannot base64decode string which is base64encode in R

2013-08-06 Thread Qiang Wang
Thanks for your Elaborative explanation. If I'm understanding correct. "ߟ" belongs to those characters that CAN be interpreted by UTF-8. Others are left as they are, such as, "\xe4" and "\xac". So the following code will show an error message, but it won't affect the use of x? x <- "\xe4" I have

Re: [R] HiPLARb installation failed when magma-lib included

2013-08-06 Thread Clara Antón Fernández
Just in case it is helpful for someone else, this is what did the trick for me. I reinstalled CUDA 5.5 (and gcc g++ and build-essential, just in case), removed the previous installation of all the related libraries and reinstalled everything and HiPLARb works perfectly now. Clara __