Re: [R] xyplot help

2013-02-20 Thread Peter Maclean
I am ploting gridded time series data. I would like the actual lat and lon value appear on the graph-if possible inside the graph as numbers. If there is also more elegant ways to plot the graphs I will appreciate more suggestions. # library(ggplot2)

[R] Scatterplot, Color by Grade Category

2013-02-20 Thread David Arnold
Hi, I have: hours=c(5,6,6,7,7,8,8,9,7,8,8,8,9,9,10,10,9,10,10,11,11,11,12); level=c(1.0,1.2,0.8,0.8,1.0,1.0,0.6,0.8,1.4,1.2,1.4,1.6, 1.2,1.4,1.0,1.4,1.6,1.6,1.8,1.4,1.6,1.8,1.6); grade=c(rep(First,8),rep(Second,8),rep(Third,7)) length(hours) length(level) length(grade)

[R] type 3 aov for repeated measures

2013-02-20 Thread Anders Sand
Hi, I know this question has been asked before but I have not seen an answer pertaining to repeated measures anovas. I got a simple data set with two factors: block (3 levels) and prime (2 levels). The dataset (expData) are stuctured so one column (block) states which block a trial is in and one

Re: [R] Scatterplot, Color by Grade Category

2013-02-20 Thread Jim Lemon
On 02/20/2013 07:44 PM, David Arnold wrote: Hi, I have: hours=c(5,6,6,7,7,8,8,9,7,8,8,8,9,9,10,10,9,10,10,11,11,11,12); level=c(1.0,1.2,0.8,0.8,1.0,1.0,0.6,0.8,1.4,1.2,1.4,1.6, 1.2,1.4,1.0,1.4,1.6,1.6,1.8,1.4,1.6,1.8,1.6); grade=c(rep(First,8),rep(Second,8),rep(Third,7)) length(hours)

Re: [R] Cramer von Mises test for a discrete distribution

2013-02-20 Thread Santiago Guallar
Thanks Barry,   Following your list order 1) It pops up a window saying R for windows GUI front-end crashed. Below three options: look for on-line solutions; shut down the program; debug the program (I'm translating from Spanish) 2) The processor of my laptop is an Intel Core duo 1,60GHz with

Re: [R] type 3 aov for repeated measures

2013-02-20 Thread Rui Barradas
Hello, Try function Anova() in package car. #install.packages(car) library(car) ?Anova # see argument 'type' Hope this helps, Rui Barradas Em 20-02-2013 09:08, Anders Sand escreveu: Hi, I know this question has been asked before but I have not seen an answer pertaining to repeated

Re: [R] R script .bat file from Python

2013-02-20 Thread Miguel Manese
Hi Fabio, I cannot reproduce it but this is probably some env var not set, or some problem with the path to your R installation having whitespace in it. See ?.libPaths, if it is empty you might want to hard-code R_HOME somewhere. Regards, On Thu, Feb 14, 2013 at 10:58 PM, Fabio Veronesi

Re: [R] Problems with line types in plots saved as PDF files

2013-02-20 Thread Eik Vettorazzi
Hi Ian, besides encouraging alternative pdf viewers, you just could thin out your interpolation grid, such as b = seq(-10, 10, 0.02) #instead of 0.0002 and everything goes fine even with AcroRead XI. Cheers Am 20.02.2013 01:09, schrieb Ian Renner: Hi, I am trying to save a plot as a PDF with

Re: [R] xyplot help

2013-02-20 Thread Duncan Mackay
Hi Peter As for more suggestions library(latticeExtra) useOuterStrips( xyplot(prec~month|year*paste(lat,lon), data=ndata, as.table = T, type = c(l, l,p), ylim=c(min, max), layout=c(1,4)) ) have a look at ?strip.custom and ?strip.default as well as ?useOuterStrips for customizing

Re: [R] Cramer von Mises test for a discrete distribution

2013-02-20 Thread Barry Rowlingson
On Wed, Feb 20, 2013 at 10:03 AM, Santiago Guallar sgual...@yahoo.com wrote: Thanks Barry, Following your list order 1) It pops up a window saying R for windows GUI front-end crashed. Below three options: look for on-line solutions; shut down the program; debug the program (I'm translating

Re: [R] Problems with line types in plots saved as PDF files

2013-02-20 Thread Berend Hasselman
On 20-02-2013, at 12:58, Eik Vettorazzi e.vettora...@uke.de wrote: Hi Ian, besides encouraging alternative pdf viewers, you just could thin out your interpolation grid, such as b = seq(-10, 10, 0.02) #instead of 0.0002 and everything goes fine even with AcroRead XI. When I received the

Re: [R] 'gmm' package: How to pass controls to a numerical solver used in the gmm() function?

2013-02-20 Thread Prof J C Nash (U30A)
This is a quite general issue that those of us who try to prepare optimization tools must deal with quite often. The minqa package internal methods were designed to be used with customized controls to the algorithm, but we had to package them with some more or less OK compromise settings. If

Re: [R] Cramer von Mises test for a discrete distribution

2013-02-20 Thread Santiago Guallar
Great Barry! Thanks for your time. I will e-mail the package maintainers.   Santi From: Barry Rowlingson b.rowling...@lancaster.ac.uk To: Santiago Guallar sgual...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Sent: Wednesday, February 20, 2013 1:36 PM Subject: Re: [R] Cramer von

Re: [R] generate variable y to produce excess zero in ZIP analysis

2013-02-20 Thread S Ellison
Subject: [R] generate variable y to produce excess zero in ZIP analysis Maybe something like rzip - function(n, lambda, zip=0.0) { #zip is the desired proportion of _excess_ zeros if(zip1.0 || zip 0) stop(zip must be in (0,1)) n.zip - ceiling(zip*n)

Re: [R] lattice 3x3 plot: force common y-limits accross rows and align x-axes

2013-02-20 Thread Boris.Vasiliev
My appologies for reposting the final message in this thread. The previous e-mail sent from a Yahoo mailbox got completely scrubbed ... - Forwarded Message - From: Boris Vasiliev bvasil...@yahoo.com To: Duncan Mackay mac...@northnet.com.au; gunter.ber...@gene.com

[R] ggplot2 customizing a plot

2013-02-20 Thread Alaios
Dear all, I want some help improve my ggplot as following: Make the plottable area with grid, so is easy one to see where each box refers to x and y values. Add a color bar but with fixed values, that I want to specify. How   I can do those two? Before is some code what I have tried so far.

Re: [R] odfWeave: Trouble Getting the Package to Work

2013-02-20 Thread Paul Miller
Hi Max,   It works! Updating the odfWeave and xml software did the trick. Thanks very much for your help.   Paul [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Bayesian mixing model

2013-02-20 Thread Richard Cooper (ENV)
Fellow R users, I'm using the BCE {BCE} function to run a Bayesian sediment mixing model. The aim is to find the optimum % contribution from each of the 4 source areas that can yield the target geochemistry. I have geochemistry for 4 source areas called Rat: Rat-read.table(text=CaO MgO

Re: [R] ggplot2 customizing a plot

2013-02-20 Thread Ista Zahn
Hi, On Wed, Feb 20, 2013 at 9:33 AM, Alaios ala...@yahoo.com wrote: Dear all, I want some help improve my ggplot as following: Make the plottable area with grid, so is easy one to see where each box refers to x and y values. I don't think you can easily move the grid to the front, but you

Re: [R] calculating seconds

2013-02-20 Thread S Ellison
I'm looking at some data which has the time in seconds since 1992/10/8, 15:15:42.5 Are there any functions currently available to translate this or should I just do my own? strptime() goes from date formats to seconds. For going the other way, see ?DateTimeClasses for a lot of

[R] a priori power analysis for glm, family = poisson

2013-02-20 Thread Chad Widmer
Dear R/statistics wizards, This may be more of a statistics question than an R one, but I’m hoping that someone has the time to help. I’ve already consulted a few local statisticians and I’ve not yet received a clear answer. Before I start an experiment I want to conduct an a priori power

[R] Error in setwd(outDir) : cannot change working directory

2013-02-20 Thread Joanna Papakonstantinou
I installed R on my Windows laptop in C:\Program Files\R\R-2.15.2 and am able to open RGUI (640bit), see packages and run commands. However, when I test the installation and run the basic tests and all the tests on the standard and recommended packages i.e.: library(tools)

[R] R and microsoft

2013-02-20 Thread teija stormi
Hi, I hava some questions about R and other softas. Which applications (softas) I can use with R? Can I connect R with Microsoft? Can I connect R with SPSS and how I can do it? I am grateful, if you can help me. -Teija teijasto...@gmail.com [[alternative HTML version deleted]]

[R] Generating QFs from same sample

2013-02-20 Thread M. Rauf Ahmad
Dear All I am kind of stuck up with a code a part of which seems to be causing a problem, or at least I think so. May be the community can help me. It’s simple but I suppose I am missing something. I generate a data matrix X, say of order n*p, where n represents independent row-vectors and p

Re: [R] NLS results different from Excel

2013-02-20 Thread Bruce McCullough
The idea that the Excel solver has a good reputation for being fast and accurate does not withstand an examination of the Excel solver's ability to solve the StRD nls test problems. Solver's ability is abysmal. 13 of 27 answers have zero accurate digits, and three more have fewer than two

Re: [R] data format

2013-02-20 Thread arun
Hi elisa, Try this: mat1-matrix(signif(c(1.200407,1.861941,1.560613,2.129241,2.047772,1.784105,1.777159,1.988596,2.163199,2.446993,3.593623,5.706672),digits=3),ncol=1)  list1- list(mat1,mat1,mat1) list2-lapply(list1,function(x)

Re: [R] 2 setGeneric's, same name, different method signatures

2013-02-20 Thread Romain Fenouil
Dear members, please excuse me for eventual mistake in posting my first message on this list. I am actually glad to read these very interesting questions and answers because I have been facing a related situation for the last 2 days. I am writing a R package that is using some of the interesting

[R] Heatmap missing in Heatmap.2 output

2013-02-20 Thread M.K. Choy
Hi, I have a matrix 11x7761245 and I am trying to do clustering, dendrogram and heatmap. The analysis was completed but only the dendrogram was written in the jpeg file. The heatmap was missing. May I know if anyone know this problem? My script: hc = hclust.vector(x, method=ward) dend =

Re: [R] Error in setwd(outDir) : cannot change working directory

2013-02-20 Thread Gabor Grothendieck
On Wed, Feb 20, 2013 at 11:54 AM, Joanna Papakonstantinou joanna.p...@gmail.com wrote: I installed R on my Windows laptop in C:\Program Files\R\R-2.15.2 and am able to open RGUI (640bit), see packages and run commands. However, when I test the installation and run the basic tests and all the

Re: [R] R and microsoft

2013-02-20 Thread Richard M. Heiberger
Please look at RExcel by Erich Neuwirth, rcom.univie.ac.at RExcel and the underlying technology RCOM server by Thomas Baier seamlessly integrate R into Excel and other Microsoft software on Windows. Please see the book R through Excel by Professor Neuwirth and me. We designed the book as a

Re: [R] NLS results different from Excel -- Tricky fortunes nomination

2013-02-20 Thread Bert Gunter
Folks: I thought the following excerpt from Bruce McCullough's post would be a good candidate for the R fortunes package -- except that it's about Excel, not R! So I nominate it... but leave it to others to say whether it's really qualified to be nominated. The idea that the Excel solver

Re: [R] Error in setwd(outDir) : cannot change working directory

2013-02-20 Thread Gabor Grothendieck
On Wed, Feb 20, 2013 at 12:33 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Wed, Feb 20, 2013 at 11:54 AM, Joanna Papakonstantinou joanna.p...@gmail.com wrote: I installed R on my Windows laptop in C:\Program Files\R\R-2.15.2 and am able to open RGUI (640bit), see packages and run

Re: [R] Problems with line types in plots saved as PDF files

2013-02-20 Thread David Winsemius
On Feb 20, 2013, at 4:36 AM, Berend Hasselman wrote: On 20-02-2013, at 12:58, Eik Vettorazzi e.vettora...@uke.de wrote: Hi Ian, besides encouraging alternative pdf viewers, you just could thin out your interpolation grid, such as b = seq(-10, 10, 0.02) #instead of 0.0002 and everything

Re: [R] Error in setwd(outDir) : cannot change working directory

2013-02-20 Thread Gabor Grothendieck
On Wed, Feb 20, 2013 at 1:01 PM, Joanna Papakonstantinou joanna.p...@gmail.com wrote: I am running as administrator. Again, the first 2 tests worked but the 3rd is still giving me an error: testInstalledBasic(basic) running strict specific tests running code in ‘eval-etc.R’ comparing

Re: [R] R and microsoft

2013-02-20 Thread S Ellison
-Original Message- I hava some questions about R and other softas. Which applications (softas) I can use with R? Can I connect R with Microsoft? Can I connect R with SPSS and how I can do it? Information on transferring data to and from other systems can be found under Importing

Re: [R] Error in setwd(outDir) : cannot change working directory

2013-02-20 Thread S Ellison
I am getting errors such as: testInstalledPackages(base,errorsAreFatal=FALSE) Error in setwd(outDir) : cannot change working directory Er, the first parameter in testInstalledPackages() is the output directory name, not the package name supplied in scope. You probably don;t have a

[R] Sending Email from R

2013-02-20 Thread Lopez, Dan
Hi R experts, I know how to send simple plain text message in body and how to send with attachments. This is thanks to stackoverflow reference below. But I don't know how to send dput() output in the body of the email (or attachment) using sendmailR. I more interested in figuring out how to

Re: [R] Sending Email from R

2013-02-20 Thread David Winsemius
On Feb 20, 2013, at 10:24 AM, Lopez, Dan wrote: Hi R experts, I know how to send simple plain text message in body and how to send with attachments. This is thanks to stackoverflow reference below. But I don't know how to send dput() output in the body of the email (or attachment)

[R] To convert a quarterly data to a monthly data.

2013-02-20 Thread Yuan, Rebecca
Hello, I have a data set has 2001Q1 100 2001Q2 101 2001Q3 120 2001Q4 103 ... And would like to convert it to a monthly data. i.e. 200101

Re: [R] Error in setwd(outDir) : cannot change working directory

2013-02-20 Thread Joanna Papakonstantinou
I am running as administrator. Again, the first 2 tests worked but the 3rd is still giving me an error: testInstalledBasic(basic) running strict specific tests running code in ‘eval-etc.R’ comparing ‘eval-etc.Rout’ to ‘eval-etc.Rout.save’ ...[1] 1 testInstalledBasic(both) running strict

[R] duplicate 'row.names' are not allowed

2013-02-20 Thread Joanna Papakonstantinou
I am getting an error when trying to import tab delimited .txt file saved from Excel. I have read what is posted on the forums but still am confused. I saved my Excel file (DataTestforR.xlsx) as a tab delimited txt file (DataTestR.txt) on my Desktop. In the RGUI, I tried to import the txt file

Re: [R] Error in setwd(outDir) : cannot change working directory

2013-02-20 Thread Gabor Grothendieck
On Wed, Feb 20, 2013 at 1:08 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Wed, Feb 20, 2013 at 1:01 PM, Joanna Papakonstantinou joanna.p...@gmail.com wrote: I am running as administrator. Again, the first 2 tests worked but the 3rd is still giving me an error:

Re: [R] Error in setwd(outDir) : cannot change working directory

2013-02-20 Thread Joanna Papakonstantinou
I ran testInstalledPackages(scope=base,errorsAreFatal=FALSE) and it completed (and spit out a graph). Does this mean I am ok to contunie using this installation of R? Should I create an output directory somewhere either in Program Files where R is installed or in my working directory? Thank you

Re: [R] a priori power analysis for glm, family = poisson

2013-02-20 Thread Joerg Luedicke
Probably the best way of doing this is via simulation. Have a look at chapter 5 of: Bolker, B. 2008. Ecological models and data in R. Princeton Univ. Press, Princeton, NJ. for an introduction and a bunch of examples. Joerg On Wed, Feb 20, 2013 at 5:49 AM, Chad Widmer cw...@st-andrews.ac.uk

Re: [R] Error in setwd(outDir) : cannot change working directory

2013-02-20 Thread Gabor Grothendieck
On Wed, Feb 20, 2013 at 2:01 PM, Joanna Papakonstantinou joanna.p...@gmail.com wrote: I ran testInstalledPackages(scope=base,errorsAreFatal=FALSE) and it completed (and spit out a graph). Does this mean I am ok to contunie using this installation of R? Should I create an output directory

Re: [R] duplicate 'row.names' are not allowed

2013-02-20 Thread David Winsemius
On Feb 20, 2013, at 10:14 AM, Joanna Papakonstantinou wrote: I am getting an error when trying to import tab delimited .txt file saved from Excel. I have read what is posted on the forums but still am confused. I saved my Excel file (DataTestforR.xlsx) as a tab delimited txt file

Re: [R] NLS results different from Excel -- Tricky fortunes nomination

2013-02-20 Thread Rolf Turner
I think that this nomination is a Good Idea! cheers, Rolf On 02/21/2013 06:50 AM, Bert Gunter wrote: Folks: I thought the following excerpt from Bruce McCullough's post would be a good candidate for the R fortunes package -- except that it's about Excel, not R! So I nominate

Re: [R] NLS results different from Excel

2013-02-20 Thread Marc Schwartz
Just as an FYI, there is the NISTnls package on CRAN by Doug Bates: http://cran.r-project.org/web/packages/NISTnls/index.html There have also been threads over the years touching on some of the issues in replicating the NIST results, for example:

Re: [R] To convert a quarterly data to a monthly data.

2013-02-20 Thread Rolf Turner
This question doesn't make a lot of sense to me. What do you expect/want your XXX values to be? If you only know that the value for the first quarter was 100, you cannot infer the individual values for January, February and March. All you know is that these values sum to 100. cheers,

Re: [R] To convert a quarterly data to a monthly data.

2013-02-20 Thread Yuan, Rebecca
Hello Rolf, Thanks for your kind reply! I figured out there is a function splint in fields that can do the cubic spine interpolation which would enable me to get the monthly series from the quarterly series. Problem solved. Here is the code I use the do the task: out - cbind(out,

Re: [R] To convert a quarterly data to a monthly data.

2013-02-20 Thread Berend Hasselman
On 20-02-2013, at 21:13, Rolf Turner rolf.tur...@xtra.co.nz wrote: This question doesn't make a lot of sense to me. What do you expect/want your XXX values to be? Well the OP wants some sort of interpolation. If you only know that the value for the first quarter was 100, you cannot

Re: [R] To convert a quarterly data to a monthly data.

2013-02-20 Thread Berend Hasselman
On 20-02-2013, at 21:21, Yuan, Rebecca rebecca.y...@bankofamerica.com wrote: Hello Rolf, Thanks for your kind reply! I figured out there is a function splint in fields that can do the cubic spine interpolation which would enable me to get the monthly series from the quarterly series.

Re: [R] 2 setGeneric's, same name, different method signatures

2013-02-20 Thread Martin Morgan
On 02/20/2013 02:19 AM, Romain Fenouil wrote: Dear members, please excuse me for eventual mistake in posting my first message on this list. I am actually glad to read these very interesting questions and answers because I have been facing a related situation for the last 2 days. I am writing a

Re: [R] Sending Email from R

2013-02-20 Thread David Winsemius
On Feb 20, 2013, at 10:44 AM, David Winsemius wrote: On Feb 20, 2013, at 10:24 AM, Lopez, Dan wrote: Hi R experts, I know how to send simple plain text message in body and how to send with attachments. This is thanks to stackoverflow reference below. But I don't know how to send

[R] Problem with levelplot() in a loop

2013-02-20 Thread Nikhil Joshi
Dear R users, I am trying to print heatmaps in a loop (with a pause). Idea is to visualize changing correlations over time and for testing I wrote this simple (reproducible) code below. My problem is that levelplot() does not produce any output when I run the code (though heatmap does). Ideally

Re: [R] Problem with levelplot() in a loop

2013-02-20 Thread John Kane
I think you need a print command in there John Kane Kingston ON Canada -Original Message- From: nikhiljo...@gmail.com Sent: Wed, 20 Feb 2013 16:38:56 -0500 To: r-help@r-project.org Subject: [R] Problem with levelplot() in a loop Dear R users, I am trying to print heatmaps in a

Re: [R] Sending Email from R

2013-02-20 Thread Lopez, Dan
David Thanks for the other resources. But I think those don't solve my problem. FYI I used sendmailR:sendmail without password. This is more or less how I ended up doing it. I can send a simple plain email or a simple plain email with an attachment or few attachments. Not sure if it makes a

Re: [R] Why R simulation gives same random results?

2013-02-20 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of C W Sent: Tuesday, February 19, 2013 5:32 PM To: r-help Subject: [R] Why R simulation gives same random results? Hi, list I am doing 100,000 iterations of Bayesian

[R] Tracking time-varying objects with the DLM package (dynamic linear models in R)

2013-02-20 Thread Samantha Azzarello
Hello all, I am working with the dlm package, specifcially doing a dlm multivariate Y linear regression using dlmModReg and dlmFilter and dlmSmooth... I have altereted the inputs into dlmModReg to make them time-varying using JFF, JW etc. How do I track the results of the time varying system

Re: [R] Why R simulation gives same random results?

2013-02-20 Thread Greg Snow
To know for sure we need to know how you are running these different R sessions, but here are some possibilities: The help page for set.seed says that if no seed exists then the seed is set based on the current time (and since 2.14.0 the process ID). So one possibility is that 2 of the sessions

Re: [R] Why R simulation gives same random results?

2013-02-20 Thread C W
Thanks, Greg. I think you are right. I did simulation one right after the other, less than 2 seconds. But still, it was shocking to see identical samples, which I had to throw away. As a rule of thumb, should I do simulation in one R console, rather than splitting the work into 2 consoles. I

[R] Plotting Discriminants from qda

2013-02-20 Thread Melanie Zoelck
Dear R Help Members, I am aware how to plot the LD1 vs LD2 from a lda in R, using the code: plot(baseline.systat.hat$x, col=baseline.systat.hat$class,pch=as.numeric(baseline.systat.hat$class)) However, I need to use the quadratic discriminant function, qda due to data properties. Is there a

Re: [R] duplicate 'row.names' are not allowed

2013-02-20 Thread Joanna Papakonstantinou
Some of the names in the columns actually have spaces in them (e.g., S L TX is in one column). So there are really 9. I was able to save the file as a csv file and read.table succesfully. On Wed, Feb 20, 2013 at 2:03 PM, David Winsemius dwinsem...@comcast.netwrote: On Feb 20, 2013, at 10:14

Re: [R] subsetting with greater than and less than indexing

2013-02-20 Thread iembry
Hi Arun, thank-you for your assistance. I'm sorry that I did not provide a reproducible example. I will provide a reproducible example the next time. Using the next to last line of your code I was able to get what I needed without using the for loop. Thanks again. Irucka -Original

[R] Fitting a gaussian distribution to a plot

2013-02-20 Thread Samantha Warnes
I have a peak I would like to fit with a gaussian distribution, and am having difficulties. First of all I am having difficulties getting R to except my function input, and additionally I am having trouble plotting the non linear model on my scatterplot of data (the peak). Here is my log:

Re: [R] Sending Email from R

2013-02-20 Thread David Winsemius
On Feb 20, 2013, at 2:21 PM, Lopez, Dan wrote: David Thanks for the other resources. But I think those don't solve my problem. FYI I used sendmailR:sendmail without password. This is more or less how I ended up doing it. I can send a simple plain email or a simple plain email with an

Re: [R] Sending Email from R

2013-02-20 Thread Lopez, Dan
David, Yes, sorry, I sent the version of this were I was playing with trying to get two sets of text in the body. You are right: body - list(It works!, mime_part(iris) ) But that doesn't address my original problem with trying to get dput() into email from R. I mean I can copy and paste as

[R] Having trouble converting a dataframe of character vectors to factors

2013-02-20 Thread Lopez, Dan
R Experts, I have a dataframe made up of character vectors--these are results from survey questions. I need to convert them to factors. I tried the following which did not work: scs2-sapply(scs2,as.factor) also this didn't work: scs2-sapply(scs2,function(x) as.factor(x)) After doing either of

Re: [R] Sending Email from R

2013-02-20 Thread William Dunlap
Try replacing dput(x) with capture.output(dput(x)) dput(x) prints a parsable representation of x but returns x. capture.output(y) returns what print(y) would have printed. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From:

Re: [R] Having trouble converting a dataframe of character vectors to factors

2013-02-20 Thread Bert Gunter
Pleaser re-read ?sapply and pay particular attention to the simplify argument. The following should help explain the issues: z - data.frame(a=letters[1:3],b=letters[4:6],stringsAsFactors=FALSE) sapply(z,class) a b character character z1 - sapply(z,as.factor)

Re: [R] Sending Email from R

2013-02-20 Thread Lopez, Dan
Hi Bill, That's awesome!!! That did the trick! Thank you so much. BTW I think spotfire is an awesome visulization and analytics tool. Too bad we can't afford it in my dept. Dan -Original Message- From: William Dunlap [mailto:wdun...@tibco.com] Sent: Wednesday, February 20, 2013

Re: [R] Plotting Discriminants from qda

2013-02-20 Thread David Winsemius
On Feb 20, 2013, at 2:42 PM, Melanie Zoelck wrote: Dear R Help Members, I am aware how to plot the LD1 vs LD2 from a lda in R, using the code: plot(baseline.systat.hat$x, col=baseline.systat.hat$class,pch=as.numeric(baseline.systat.hat$class)) However, I need to use the quadratic

Re: [R] Error in setwd(outDir) : cannot change working directory

2013-02-20 Thread S Ellison
Should I create an output directory somewhere either in Program Files where R is installed or in my working directory? If I wanted to create a writeable test directory I'd put it in my own workspace, not the program files space. But why do you think you need to create an output directory?

Re: [R] Tracking time-varying objects with the DLM package (dynamic linear models in R)

2013-02-20 Thread Giovanni Petris
Hi Samantha, I had not anticipated such kind of requests, so getting what (I believe) you want is not totally trivial. However, what 'dlmFilter' does, when dealing with a time-varying DLM, is to build, at each time, the appropriate matrix W from 'JW' and 'X'. So, I suggest that you look at

Re: [R] Fitting a gaussian distribution to a plot

2013-02-20 Thread arun
Hi, Do you need exp^?  Should it be exp(-((...? x1-as.numeric(x)  sd1-sd(small) mean1- mean(small) ((1/sd1)*sqrt(2*pi))*exp(-((x1-mean1)^2)/(2*(sd1^2))) # [1] 4.189541e-27 4.190295e-27 4.191049e-27 4.191803e-27 4.192557e-27  #[6] 4.193311e-27 4.194065e-27 4.194820e-27 4.195574e-27 4.196329e-27

Re: [R] duplicate 'row.names' are not allowed

2013-02-20 Thread Jim Lemon
On 02/21/2013 07:10 AM, Joanna Papakonstantinou wrote: Some of the names in the columns actually have spaces in them (e.g., S L TX is in one column). So there are really 9. I was able to save the file as a csv file and read.table succesfully. Hi Joanna, As you specified space ( ) as the field

[R] About multivariate GARCH: DVEC and BEKK

2013-02-20 Thread jpm miao
Dear All, I attempted to fit a DVEC and a BEKK multivariate GARCH model, but am wondering which package to use. 1. I tried to use rmgarch package in R, but I couldn't find the subroutines for DVEC and BEKK. 2. I tried to find rmgarch package of R, which is not located on the official R

Re: [R] Having trouble converting a dataframe of character vectors to factors

2013-02-20 Thread Mark Lamias
How about this? scs2-data.frame(lapply(scs2, factor)) From: Lopez, Dan lopez...@llnl.gov To: R help (r-help@r-project.org) r-help@r-project.org Sent: Wednesday, February 20, 2013 7:09 PM Subject: [R] Having trouble converting a dataframe of character vectors

[R] error with bbox for k12hat (splancs) bivarite k-function

2013-02-20 Thread awooditc
Hello, I am trying to conduct a bi-variate ripley's k using the k12hat function in the splancs package (found here http://rss.acs.unt.edu/Rdoc/library/splancs/html/k12hat.html). Although, I receive an error when getting to the bboxx part of the code: poly - list(x=c(fire4$X, nar4$X),

Re: [R] Why R simulation gives same random results?

2013-02-20 Thread Prof Brian Ripley
On 20/02/2013 23:13, Greg Snow wrote: To know for sure we need to know how you are running these different R sessions, but here are some possibilities: The help page for set.seed says that if no seed exists then the seed is set based on the current time (and since 2.14.0 the process ID). So

Re: [R] error with bbox for k12hat (splancs) bivarite k-function

2013-02-20 Thread Jim Lemon
On 02/21/2013 04:53 PM, awooditc wrote: Hello, I am trying to conduct a bi-variate ripley's k using the k12hat function in the splancs package (found here http://rss.acs.unt.edu/Rdoc/library/splancs/html/k12hat.html). Although, I receive an error when getting to the bboxx part of the code: