Re: [R] function to reduce resolution of a vector or matrix?

2011-06-08 Thread peter dalgaard
On Jun 3, 2011, at 17:42 , Carl Witthoft wrote: Hi, I feel dumb even asking, but isn't there an R function somewhere that I can use to reduce the resolution of a vector (or matrix) by summing terms in uniform blocks? That is, for a vector X, reduce it to some X.short as X.short[1]-

[R] Can we prepare a questionaire in R

2011-06-08 Thread amrita gs
Is there a way to prepare a questionnaire in R like html forms whose data can be directly populated into R? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] using stimulate(model) for parametric bootstrapping in lmer repeatabilities

2011-06-08 Thread Jenni Sanderson
Hi all, I am currently doing a consistency analysis using an lmer model and trying to use parametric bootstrapping for the confidence intervals. My model is like this: model-lmer(y~A+B+(1|C/D)+(1|E),binomial) where E is the individual level for consistency analysis, A-D are other fixed and

Re: [R] determine frequencies in a matrix by row

2011-06-08 Thread the_big_kowalski
here's the code to generate the matrix set.seed(1) types = c(1,2,3) n=5 p=1 pop.props = c(0.6,0.2,0.2) x=matrix(pop.props,nrow=n,ncol=length(pop.props), byrow=T) b=10 habs = rMultinom((x),b) print(habs) -- View this message in context:

[R] determine frequencies in a matrix by row

2011-06-08 Thread the_big_kowalski
Hi, I have a matrix [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]131131123 2 [2,]131211122 1 [3,]122321112 1 [4,]321113121

Re: [R] About DCC-garch model...

2011-06-08 Thread windseav
Thank you all guys!! I have some other questionsFor garch model, for example, we have 10 time periods, and the function use MLE to get the parameters based on these 10 time periods. Then, the function calculates covariance matrix at each time period based on the estimated parameters. Is this

Re: [R] determine frequencies in a matrix by row

2011-06-08 Thread Mohamed Lajnef
Hi, Try apply function: apply(matrix,1,table) Regards M Le 08/06/11 08:23, the_big_kowalski a écrit : Hi, I have a matrix [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]131131123 2 [2,]1312111

Re: [R] using stimulate(model) for parametric bootstrapping in lmer repeatabilities

2011-06-08 Thread Søren Højsgaard
Dear Jenni, In the newest version of the doBy package there is a function called PBrefdist (and PBrefdist.mer) for calculating the reference distribution of the likelihood ratio statistic for comparing nested models. Looking into this function may help you. Perhaps the functions PBmodcomp and

Re: [R] Classifying boolean values

2011-06-08 Thread Grifone
Thanks Sarah for the response; with the command str(echoknn.train) the coloumn class is a logi value (i think without any immagination that is a logical value ). So, how can I handle this type of data? Thanks a lot. P.S. Yes, is a course assignment and i was hoping to solve this problem

Re: [R] library(SenoMineR)- Triangle Test Query

2011-06-08 Thread Meyners, Michael
Vijayan, I cannot find an error in your code, but I had a look at the code of triangle.test -- unless I'm missing something, it contains a bug. If you study the way in which the matrix pref is updated, you find that the vector preference is compared to 1, 2 and 3 instead of X, Y and Z as it

[R] MBA the h value?

2011-06-08 Thread Clement LAUZIN
Hello everybody, I am trying different ways of interpolating a surface. Now, I am trying to interpolate these values using the MBA package. In order to do it I am using the surface option of the package. mba.surf(xyz, 20, 20, n = 1, m = 1, h = 8, extend=FALSE, sp=FALSE, ...) The function

[R] Decision Trees /Decision Analysis with R?

2011-06-08 Thread stefan.d...@gmail.com
Hello, this question is a bit out of the blue. I am a big R fan and user and in my new job I do some decision modeling (mostly health economics). For that decision trees are often used (I guess the most classic example is the investment decision A, B, and C with different probabilities, what is

Re: [R] R and DBSCAN

2011-06-08 Thread Christian Hennig
Dear Paco, I tried dbscan on my computer with method=hybrid and a 155000*3 data matrix and it works. Needs some time though. (You can track the progress using something like countmode=c(1:10,100,1000,1,10).) Note that for some reason I don't exactly understand, it takes *much* longer

[R] plotting boxplot based on frequency/count data

2011-06-08 Thread Ioannis Filippis
Hi all, I have a huge dataset of values and I have precalculated outside of R the frequency/count distribution (as for example counts returned by hist function or the output of table function). For example, x-hist(c(1,2,2,2,1,3), breaks=0:3, plot=F) x $breaks [1] 0 1 2 3 $counts [1] 2 3 1 Is

[R] 2.13 version doesn't load packages

2011-06-08 Thread Mariana Varela
Hi, I just installed the 2.13 version for Mac (without uninstalling the previous versions). I transferred the folder library containing the packages I normally use to the 2.13 library folder. When I require any package this is what I get: require(ape) Loading required package: ape Error in

Re: [R] Can we prepare a questionaire in R

2011-06-08 Thread Mike Marchywka
Date: Wed, 8 Jun 2011 12:37:33 +0530 From: ammasamri...@gmail.com To: r-help@r-project.org Subject: [R] Can we prepare a questionaire in R Is there a way to prepare a questionnaire in R like html forms whose data can be directly populated into

Re: [R] determine frequencies in a matrix by row

2011-06-08 Thread jim holtman
If the result is limited to just the counts of 1,2 and 3, you can do the following: habs - matrix(sample(1:3, 50, TRUE, prob=c(.6,.2,.2)),5,10) habs [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]132113111 2 [2,]123131

Re: [R] RgoogleMaps Axes

2011-06-08 Thread Mike Marchywka
Date: Tue, 7 Jun 2011 09:50:10 -0700 From: egregory2...@yahoo.com To: r-help@r-project.org Subject: [R] RgoogleMaps Axes R Help, I posted a question on StackOverflow yesterday regarding an issue I've been having with the RgoogleMaps

Re: [R] Can we prepare a questionaire in R

2011-06-08 Thread amrita gs
How can we create HTML forms in R [[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

Re: [R] Decision Trees /Decision Analysis with R?

2011-06-08 Thread Jonathan Daily
See packages rpart, randomForest, party. Also, typing R Decision Trees produced good google results. http://www.google.com/search?aq=fsourceid=chromeie=UTF-8q=R+Decision+Trees On Wed, Jun 8, 2011 at 7:02 AM, stefan.d...@gmail.com stefan.d...@gmail.com wrote: Hello, this question is a bit out

Re: [R] 2.13 version doesn't load packages

2011-06-08 Thread Prof Brian Ripley
On Wed, 8 Jun 2011, Mariana Varela wrote: Hi, I just installed the 2.13 version for Mac (without uninstalling As the posting guide says, there is no such version of R Also, I think you did uninstall a previous version, for it is missing and the default behaviour of the Apple installer

Re: [R] Decision Trees /Decision Analysis with R?

2011-06-08 Thread stefan.d...@gmail.com
Thank you so much for reply. But I am looking for the exact opposite. I do not have a data set which I want to partition. But already a sequence/tree-like set of decision rules and with which I want to simulate what is my expected outcome/pay-off given a particular scenario. As far as I

Re: [R] library(SenoMineR)- Triangle Test Query

2011-06-08 Thread Meyners, Michael
Unless I missed it, neither the OP nor the list was CC'd on this, so for anyone interested, I forward this solution (untested from my side) from the package maintainer. Not sure whether the file comes through, so I include the updated code in the message's body below. Cheers, Michael

Re: [R] Decision Trees /Decision Analysis with R?

2011-06-08 Thread Jonathan Daily
So TreeAge fits models but won't predict from them? That seems like bizarre behavior. I suppose I would recommend, then, looking at the source code from the aforementioned packages for how they store their split data. It sounds like you would have to write code to hack TreeAge outputs into another

Re: [R] Cleveland dot plots

2011-06-08 Thread William G. Jacoby
Colin Wahl wrote: I would rather use cleveland dot plots than bar charts to display my study results. I have not been able to find (or figure out) an R package that is capable of producing the publication quality dot charts Im looking for. I have either not been able to get error bars

Re: [R] Can we prepare a questionaire in R

2011-06-08 Thread Matt Shotwell
As Mike had written, there are frameworks for web-development with R. RApache http://www.rapache.net is one. Also, see the R package Rook: http://cran.r-project.org/web/packages/Rook/index.html . On Wed, 2011-06-08 at 17:26 +0530, amrita gs wrote: How can we create HTML forms in R Wouldn't

[R] residual checking for GAM (mgcv)

2011-06-08 Thread Samuel Turgeon
Dear list, i'm checking the residuals plots of a gam model after a processus of model selection. I found the best model, all my terms are significant, the r-square and the deviance explained are good, but I have strange residuals plots: http://dl.dropbox.com/u/1169100/gam.check.png

Re: [R] Can we prepare a questionaire in R

2011-06-08 Thread Barry Rowlingson
On Wed, Jun 8, 2011 at 12:56 PM, amrita gs ammasamri...@gmail.com wrote: How can we create HTML forms in R HTML is Just Plain Text, so you can create them using R's text output 'cat' function. E.g. cat('form First name: input type=text name=firstname /br /Last name: input type=text

[R] install the “impute” package in unix

2011-06-08 Thread Salih Tuna
Hi, I am trying to install the “impute” package in unix. but I get the following error message. I followed the following steps. Do you know what is causing this and how I can solve this problem? source(http://www.bioconductor.org/biocLite.R;) biocLite(impute) Using R version 2.11.1,

[R] 3D-plotting a 2D-matrix that contains z-values (3rd dimension)

2011-06-08 Thread Oliver
Hello, say I have a 2D-matrix (indexed by x and y), which contains z values, which I want to plot over x-y. Either dotted, or if possible as a landscape. I tried around with persp and plot3d (from rgl) and persp3d (from rgl). I sometimes get something that looks good and a while later, when

Re: [R] predict with model (rms package)

2011-06-08 Thread Frank Harrell
This is a consequence of predict.ols calling predictrms which relies on model.frame which re-issues the expression of x.knots. You would have the same problem if using update(fit object) in another session. For that reason you have to keep an external knots vector available in your environment.

Re: [R] install the “impute” package in unix

2011-06-08 Thread Salih Tuna
I manage to install the package. But I cant load it now. It says: library(CGHcall) Loading required package: impute Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/nfs/users/nfs_s/st5/R-modules/impute/libs/impute.so': libgfortran.so.1: cannot open

[R] The simplest bar graph with ggplot is difficult to realize

2011-06-08 Thread Juan Carlos Borrás
Dear all, What is the simplest way of producing a bar graph using ggplot but avoiding calling qplot? That is, given: d - data.frame(x=seq(1,5), y=seq(1,5)) Why does the following line return an error? ggplot(d, aes(x=x, y=y)) + stat_identity() + geom_bar(bindwidth=1) Thanks in advance, jcb!

Re: [R] Error Installing or Updating Packages (Maybe because of a proxy)

2011-06-08 Thread Olivier Crouzet
Dear all, I receive the very same error message on a Debian computer (testing) with R 2.13.0 also. install.packages('emu') Installing package(s) into ‘/home/olivier/R/i486-pc-linux-gnu-library/2.13’ (as ‘lib’ is unspecified) Error in ret[i, ] - c(pkgs[i], lib, desc) : number of items to

Re: [R] The simplest bar graph with ggplot is difficult to realize

2011-06-08 Thread Ista Zahn
Hi Juan, Each geom can have it's own stat, so stat_identity() doesn't change the stat used by geom_bar(). You need ggplot(d, aes(x=x, y=y)) + geom_bar(stat=identity) Best, Ista 2011/6/8 Juan Carlos Borrás jcbor...@gmail.com: Dear all, What is the simplest way of producing a bar graph using

[R] CGHcall and normalization

2011-06-08 Thread Salih Tuna
Hi, i am trying to use the normalization function from CGHcall library. The command i use is normal.fullData - normalize(fullData, method = median, cellularity = 1) and i get the following error message. How can i solve this issue. Error in function (classes, fdef, mtable) : unable to find

[R] PS to Taking Integral and Optimization using Integrate() and Optim()

2011-06-08 Thread MARYAM ZOLGHADR
Hello again. Thank you for the comments. I have written these codes. iy=function(x) { res=NULL ress=0 for (i in (1:2)) { for (xx in x[i]) { fy=function(y) (exp(-exp(y+log(xx)))*(-exp(y+log(xx)))^2)/(1-exp(-exp(y+log(xx res=c(res,integrate(fy,-6.907,-1.246)$value) ress=ress+res } }

Re: [R] Decision Trees /Decision Analysis with R?

2011-06-08 Thread Graham Smith
Jon, So TreeAge fits models but won't predict from them? That seems like bizarre behavior. Nothing bizarre about TreeAge, just a different tool in a different disicpline. http://en.wikipedia.org/wiki/Decision_tree Graham [[alternative HTML version deleted]]

Re: [R] Decision Trees /Decision Analysis with R?

2011-06-08 Thread stefan.d...@gmail.com
TreeAge works just fine. But its commercial, thats all... On Wed, Jun 8, 2011 at 6:17 PM, Graham Smith myotis...@gmail.com wrote: Jon, So TreeAge fits models but won't predict from them? That seems like bizarre behavior. Nothing bizarre about TreeAge, just a different tool in a different

Re: [R] XML segfault on some architectures

2011-06-08 Thread Janet Young
Dear Prof Ripley, Apologies - I've re-sent that to Duncan Temple Lang, along with your note about lib versions. Version info was included in my original post - I gave full sessionInfo(). It's XML_3.4-0. I only have a very sketchy understanding of libraries and systems administration, but it

[R] Help with plotting plsr loadings

2011-06-08 Thread Amit Patel
Hi I am attempting to do a loadings plot from a plsr object. I have managed to do this using the gasoline data that comes with the pls package. However when I conduct this on my dataset i get the following error message. plot(BHPLS1, loadings, comps = 1:2, legendpos = topleft, labels =

[R] How to suppress factor labels

2011-06-08 Thread James Rome
I am using ggplot2 to make a boxplot that overlays a scatterplot: pp = qplot(time, error, data=times, size=I(1), geom=jitter, main=title, ylab=Error (min), xlab=Time before ON (min), alpha=I(1/10), color=times$runway, ylim=c(-30,40)) pp2 = pp + with(times, facet_wrap(~ runway,

[R] [R-pkgs] svmpath_0.95 uploaded to CRAN

2011-06-08 Thread Trevor Hastie
This new version includes a plot method for plotting a particular instance along the path. Trevor Hastie has...@stanford.edu Professor, Department of Statistics,

Re: [R] How to suppress factor labels

2011-06-08 Thread Ista Zahn
Hi Jim, See ?scale_x_discrete Best, Ista On Wed, Jun 8, 2011 at 3:26 PM, James Rome jamesr...@gmail.com wrote: I am using ggplot2 to make a boxplot that overlays a scatterplot: pp = qplot(time, error, data=times, size=I(1), geom=jitter, main=title,        ylab=Error (min), xlab=Time before

[R] Variable in file name png

2011-06-08 Thread Aaron Coutino
Hi, I'm having trouble with getting the png function to properly produce multiple graphs. RIght now I have: for (z in data) { png(file=z,bg=white) thisdf-data[[z]] plot(thisdf$rc,thisdf$psi) dev.off() } Which should take the data object, a list of data sets and produce a graph of each

[R] Histogram

2011-06-08 Thread nandini_bn
Hello , I am trying to create a histogram in order to compare between two groups and would like it to be similar to the figure attached. How can I generate this using R ? Thank you, Nandini http://r.789695.n4.nabble.com/file/n3582448/5634-15977-1-PB.gif -- View this message in context:

[R] histogram help

2011-06-08 Thread Nandini B
Hello , I am trying to create a histogram in order to compare between two groups and would like it to be similar to the figure attached. How can I generate this using R ? Thank you, Nandini __

[R] R command window

2011-06-08 Thread Michael Davidsen
Hello. I'm a visually impaired statistician, working at the National Institute of Public Health in Denmark. I would like to use R for some analysis and have succesfully installed version 2.13.0 on my Windows XP labtop. I then would like to run R interactively but unfortunately the textfont of

Re: [R] Adding values to the end of a data frame

2011-06-08 Thread Abraham Mathew
I'm trying to develop this function so that I can efficiently generate all possibile combinations of the strings. So I have certain roots, prefixes, and sufixes. I also have different combinations of the data, some with two strings (roots, prefix) and others with three strings (roots, prefix,

[R] how can I??

2011-06-08 Thread 전경욱
st1=c(5,3) st2=c(-1,2) st3=c(1,3) st4=c(2,6) st = rbind(st1,st2,st3,st4) st dx=round(dist(st), digits=2) dx #À¯Å¬¸®µå °Å¸®Çà·Ä D1=dist(st, method=quot;euclideanquot;) D1 # À¯Å¬¸®µå°Å¸® ±¸Çϱâ D2=dist(st, method=quot;manhattanquot;) D2 # ¸ÇÇÏź °Å¸®Çà·Ä and I want know How can i use

[R] package.skeleton() does not create 'data' folder

2011-06-08 Thread Nipesh Bajaj
Hi again, I was using package.skeleton() function to create the skeleton of my package in windows. Here is my attempt: rm(list = ls()) setwd(F:/R_PackageBuild) package.skeleton(trial1, namespace = TRUE, code_files = F:/R_PackageBuild/trial.r) In the trial.r file, there are 2 objects, one is a

Re: [R] predict with model (rms package)

2011-06-08 Thread Mark Seeto
Thanks for your reply, Frank. I've noticed that the x.knots object doesn't actually have to be the vector of knots. Just having x.knots - 0 or even x.knots - a will allow predict to work. Mark Seeto Frank Harrell wrote: This is a consequence of predict.ols calling predictrms which relies on

Re: [R] Decision Trees /Decision Analysis with R?

2011-06-08 Thread Anupam
It is difficult for someone from a statistical frame of mind to understand what this is about --- you need to think a bit differently. It is mostly a simulation and decision analysis, with some use of statistical functions to draw random samples to simulate the fact that outcome of interest can

[R] Results of CFA with Lavaan

2011-06-08 Thread R Help
I've just found the lavaan package, and I really appreciate it, as it seems to succeed with models that were failing in sem::sem. I need some clarification, however, in the output, and I was hoping the list could help me. I'll go with the standard example from the help documentation, as my

Re: [R] Results of CFA with Lavaan

2011-06-08 Thread Jeremy Miles
What do you mean by latent estimate? The table of variances has variances for each factors. Is there something different in the sem output that you don't see here? Yes, this looks normal. Jeremy On 8 June 2011 13:14, R Help rhelp.st...@gmail.com wrote: I've just found the lavaan package,

[R] Questions about building R packages

2011-06-08 Thread Xia.Li
Hello R users, I have difficulties when trying to make R packages. I tried to read many tutorials but still could not find out the right way. Could any one help me out please? (I'm using Windows xp.) After running package.skeleton() and edit those RD files, I don't know how to use Rtools (or CMD

Re: [R] Results of CFA with Lavaan

2011-06-08 Thread John Fox
Dear Sam, In each case, the first observed variable is treated as a reference indicator with its coefficient fixed to 1 to establish the metric of the corresponding factor and therefore to identify the model. If you didn't do the same thing (or something equivalent, such as fixing the factor

[R] Autocorrelation in R

2011-06-08 Thread Iuri Gavronski
Hi, I am trying to learn time series, and I am attending a colleague's course on Econometrics. However, he uses e-views, and I use R. I am trying to reproduce his examples in R, but I am having problems specifying a AR(1) model. Would anyone help me with my code? Thanks in advance! Reproducible

Re: [R] Decision Trees /Decision Analysis with R?

2011-06-08 Thread Kjetil Halvorsen
see inline below. On Wed, Jun 8, 2011 at 12:37 PM, Anupam anupa...@gmail.com wrote: It is difficult for someone from a statistical frame of mind to understand what this is about --- you need to think a bit differently. It is mostly a simulation and decision analysis, with some use of

Re: [R] XML segfault on some architectures

2011-06-08 Thread Janet Young
Hi, Our sysadmin updated libxml2 to version 2.7.8, and now xmlTreeParse works fine with no segfault. Thank you very much - that was very helpful, Janet On Jun 8, 2011, at 11:59 AM, Janet Young wrote: Dear Prof Ripley, Apologies - I've re-sent that to Duncan Temple Lang, along with your

[R] accessing files from subfolders

2011-06-08 Thread J
Hi, There must be an easy way to do this, but I'm not finding it.. I'd just like to know the syntax to move up and down folder levels, without necessarily entering a full file path. Also, how to construct file and folder paths using variables. For example 1, if I wanted to print to the

Re: [R] How to suppress factor labels

2011-06-08 Thread James Rome
I think the issue is that the x axis is a factor. How would ggplot2 know which ones to drop? So it labels them all. If I do the following, the labels get better: pp = qplot(time, error, data=times, size=I(1), geom=jitter, main=title, ylab=Error (min), xlab=Time before ON (min),

Re: [R] How to suppress factor labels

2011-06-08 Thread Ista Zahn
On Wed, Jun 8, 2011 at 5:02 PM, James Rome jamesr...@passur.com wrote: I think the issue is that the x axis is a factor. Rather the opposite I think. In the data you sent, time is numeric, not a factor. This works for me: qplot(factor(time), error, data=times, size=I(1), geom=boxplot) +

Re: [R] accessing files from subfolders

2011-06-08 Thread Duncan Murdoch
On 11-06-08 5:35 PM, J wrote: Hi, There must be an easy way to do this, but I'm not finding it.. I'd just like to know the syntax to move up and down folder levels, without necessarily entering a full file path. Also, how to construct file and folder paths using variables. For example

Re: [R] Results of CFA with Lavaan

2011-06-08 Thread R Help
Yes, that is the difference. For the last SEM I built I fixed the factor variances to 1, and I think that's what I want to do for the CFA I'm doing now. Does that make sense for a CFA? I'll try figuring out how to do that with lavaan later, but my model takes so long to fit that I can't try it

Re: [R] Questions about building R packages

2011-06-08 Thread Duncan Murdoch
On 11-06-08 4:17 PM, Xia.Li wrote: Hello R users, I have difficulties when trying to make R packages. I tried to read many tutorials but still could not find out the right way. Could any one help me out please? (I'm using Windows xp.) Read the Writing R Extensions manual, not the many

Re: [R] accessing files from subfolders

2011-06-08 Thread Henrique Dallazuanna
Try this: lapply(dir(myPathDir, recursive = TRUE, pattern = myFile.txt$, full.names = TRUE), readLines, warn = FALSE) On Wed, Jun 8, 2011 at 6:35 PM, J jonsle...@gmail.com wrote: Hi,   There must be an easy way to do this, but I'm not finding it.. I'd just like to know the syntax to move up

[R] return counts of elements on a table column depending on elements on another column

2011-06-08 Thread ads pit
Hi, I am given the following table: head(hsa_refseq) chr genome regionstart stop nu strand nu.1nu.2 gene_id 1 chr1 hg19_refGeneCDS 6742 6751 0 +0 gene_id NM_032291 2 chr1 hg19_refGene exon 66999825 6751 0 +. gene_id NM_032291 3 chr1

Re: [R] R command window

2011-06-08 Thread Duncan Murdoch
On 11-06-08 9:28 AM, Michael Davidsen wrote: Hello. I'm a visually impaired statistician, working at the National Institute of Public Health in Denmark. I would like to use R for some analysis and have succesfully installed version 2.13.0 on my Windows XP labtop. I then would like to run R

Re: [R] Histogram

2011-06-08 Thread R Help
I think the command you want is barplot x = rbinom(10,15,0.65) y = rbinom(10,15,0.25) barplot(rbind(x,y),beside=TRUE) Sam On Wed, Jun 8, 2011 at 10:14 AM, nandini_bn nandini...@hotmail.com wrote: Hello , I am trying to create a histogram in order to compare between two groups and would

Re: [R] Histogram

2011-06-08 Thread Steven Kennedy
Have a look at: http://addictedtor.free.fr/graphiques/thumbs.php One of the graph examples they have is exactly what you are after. On Wed, Jun 8, 2011 at 11:14 PM, nandini_bn nandini...@hotmail.com wrote: Hello , I am trying to create a histogram in order to compare between two groups and

Re: [R] error with geomap in googleVis

2011-06-08 Thread Michael Phipps
SNV Krishna krishna at primps.com.sg writes: Hi All, I am unable to get the plot geomap in googleVis package. data is as follows head(index.ret) countryytd 1 Argentina -10.18 2 Australia -3.42 3 Austria -2.70 4 Belgium 1.94 5Brazil -7.16 6Canada 0.56

Re: [R] return counts of elements on a table column depending on elements on another column

2011-06-08 Thread Martin Morgan
On 06/08/2011 03:06 PM, ads pit wrote: Hi, I am given the following table: head(hsa_refseq) chr genome regionstart stop nu strand nu.1nu.2 gene_id 1 chr1 hg19_refGeneCDS 6742 6751 0 +0 gene_id NM_032291 2 chr1 hg19_refGene exon 66999825 6751 0

Re: [R] Results of CFA with Lavaan

2011-06-08 Thread John Fox
Dear Sam, -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of R Help Sent: June-08-11 5:57 PM To: John Fox Cc: r-help Subject: Re: [R] Results of CFA with Lavaan Yes, that is the difference. For the last SEM I built I fixed

Re: [R] Autocorrelation in R

2011-06-08 Thread Achim Zeileis
On Wed, 8 Jun 2011, Iuri Gavronski wrote: Hi, I am trying to learn time series, and I am attending a colleague's course on Econometrics. However, he uses e-views, and I use R. I am trying to reproduce his examples in R, but I am having problems specifying a AR(1) model. Would anyone help me

[R] Automating a process

2011-06-08 Thread Abraham Mathew
I have a series of strings and I am trying to find all combinations and then assign 1 or 0 to them based on whether they contain the words car or budged. I want the data to look like: car budget cheap car insurance quote10 budget car insurance quote 11

[R] Error: missing values where TRUE/FALSE needed

2011-06-08 Thread Abraham Mathew
I'm writing a function and keep getting the following error message. myfunc - function(lst) { lst - list(roots = c(car insurance, auto insurance), roots2 = c(insurance), prefix = c(cheap, budget), prefix2 = c(low cost), suffix = c(quote, quotes), suffix2 = c(rate, rates), suffix3 = c(comparison))

[R] ANOVA with many IV's

2011-06-08 Thread mandakaye
I'd like to conduct one-way ANOVA's on multiple IV's. Is there a function for aov (y~all of my IV's)? Thank you! -- View this message in context: http://r.789695.n4.nabble.com/ANOVA-with-many-IV-s-tp3583788p3583788.html Sent from the R help mailing list archive at Nabble.com.

[R] Using a function inside a function

2011-06-08 Thread Abraham Mathew
I'm trying to run a function inside a function but get an error message. lst - list(roots = c(car insurance, auto insurance), roots2 = c(insurance), prefix = c(cheap, budget), prefix2 = c(low cost), suffix = c(quote, quotes), suffix2 = c(rate, rates), suffix3 = c(comparison)) myfunc -

[R] Resources for utilizing multiple processors

2011-06-08 Thread Robin Jeffries
Hello, I know of some various methods out there to utilize multiple processors but am not sure what the best solution would be. First some things to note: I'm running dependent simulations, so direct parallel coding is out (multicore, doSnow, etc). I'm on Windows, and don't know C. I don't plan

Re: [R] ANOVA with many IV's

2011-06-08 Thread Dennis Murphy
Hi: You can try something like this: assuming the factor variables of interest and the response variable are in a data frame named df, ivset - c(comma separated vector of factor names) myaovs - lapply(ivset, function(x) { form - as.formula(substitute(yvar ~ foo, list(foo = as.name(x

Re: [R] Using a function inside a function

2011-06-08 Thread Joshua Wiley
Hi Abraham, Your example runs fine for me. I get this as the newdf object (you should be able to copy and paste into your console): newdf - structure(list(keyword = structure(c(7L, 3L, 5L, 1L, 8L, 4L, 6L, 2L, 15L, 11L, 13L, 9L, 16L, 12L, 14L, 10L, 20L, 18L, 19L, 17L, 23L, 21L, 24L, 22L, 27L,

Re: [R] Error: missing values where TRUE/FALSE needed

2011-06-08 Thread Joshua Wiley
Hi Abraham, mylist - list(roots = car, prefix = cheap) myfoo - function(x) { print(mylist$x) } myfoo(roots) ## fails, but in a sneaky way ## you actually extract variable x from mylist ## but there is no variable x (it is just NULL) ## so while no error is thrown, you get nothing myfoo -

[R] a bug in heatmap.plus?

2011-06-08 Thread Shi, Tao
Hi Allen and list, See the code below.  I've tried it on R2.13 and R2.8.0 using either heatmap.plus 1.3 or the latest.  All gave the same results.  The problem is in the last line: when I tried to plot two different color bars, the one corresponding to cm.colors(10) is not correct (it starts

[R] Permission denied in Windows 7

2011-06-08 Thread steven mosher
I'm using package.skeleton() windows 7, 64 bit. When I try to specify the code_files package_skeleton(code_files = some directory) I get a warning that that the connection cannot be opened and I get a Permissions denied error. I'm running R as admin and I've given everybody full

Re: [R] Questions about building R packages

2011-06-08 Thread steven mosher
here i wrote a step by step tutorial. http://stevemosher.wordpress.com/2011/06/09/making-simple-packages-in-r-on-windows/ On Wed, Jun 8, 2011 at 1:17 PM, Xia.Li oddity...@gmail.com wrote: Hello R users, I have difficulties when trying to make R packages. I tried to read many tutorials but

Re: [R] ANOVA with many IV's

2011-06-08 Thread Rolf Turner
It is not nearly as complicated as Dennis Murphy makes out. Just do aov(y ~ ., data=X) where X is your data frame with one column (the response) name ``y'' and then any number of other columns which will then form the predictors (which may be either numeric predictors or factors).

Re: [R] Histogram

2011-06-08 Thread nandini_bn
Hi Sam,This is exactly what I wanted. Could you please explain the code ? what does 15, 0.65 and 0.25 stand for ?Nandini Date: Wed, 8 Jun 2011 15:16:45 -0700 From: ml-node+3583766-897200094-233...@n4.nabble.com To: nandini...@hotmail.com Subject: Re: Histogram I think the command