Re: [R] help with kriging interpolation

2013-04-04 Thread Mohammed Ouassou
Hei, Non-parametric linear spatial interpolation algorithm Ordinary Kriging using geoR package library(geoR) # 1. Create a geodata object (wMatrix contains coords and data # ? as.geodata ---> for more info my_geoData <- as.geodata(wMatrix, coords.col=1:2, data.col=3); # 2. Create a vario

Re: [R] Accessing examplars in apcluster (apcluster package)

2013-04-04 Thread Ulrich Bodenhofer
Dear Sachin, If you need the exemplars for further processing, you can access them via the 'exemplars' slot of the resulting APResult object. See the following example: > apres <- apcluster(negDistMat(r=2), x, details=TRUE) > apres APResult object Number of samples = 150 Number of iter

[R] Assessing the fit of a nonlinear model to a new dataset

2013-04-04 Thread Rebecca Lester
Hi all, I am attempting to apply a nonlinear model developed using nls to a new dataset and assess the fit of that model. At the moment, I am using the fitted model from my fit dataset as the starting point for an nls fit for my test dataset (see below). I would like to be able to view the t-s

Re: [R] List of non available packages for R 3.0.0 ?

2013-04-04 Thread Prof Brian Ripley
On 05/04/2013 06:00, Marc Girondot wrote: I just try the new R version 3.0.0. All is good until now. However, I had the surprise to see that all packages are not available. For CRAN, they all are, by definition. They are source packages, not tied to any version of R (although a dozen or so de

[R] List of non available packages for R 3.0.0 ?

2013-04-04 Thread Marc Girondot
I just try the new R version 3.0.0. All is good until now. However, I had the surprise to see that all packages are not available. Until now I found one missing for OSX among these I used: maptools Is there a list of packages that were available in CRAN for 2.15 version and no more available ? A

Re: [R] categorized complete list of R commands?

2013-04-04 Thread Hadley Wickham
Here's a categorisation of all the functions in base and utils that I made recently (not sure if the csv will survive posting the list). Feedback welcomed - this was just a quick first pass, and it's not authoritative. Hadley On Thu, Apr 4, 2013 at 12:34 AM, ivo welch wrote: > every time I read t

Re: [R] categorized complete list of R commands?

2013-04-04 Thread ivo welch
hi michael: now give my code and your middle rewrites code to an R novice and ask them to guess what it does. ;-). my personal rule, for the most part, is to go with the clever idiomatic way when performance or space matter AND, and to go for the simple idiotic way when I want to understand in a

Re: [R] X11 font -adobe-helvetica size 15 could not be loaded

2013-04-04 Thread Prof Brian Ripley
See ?X11 and the 'R Installation and Administration Manual'. You are dragging up ancient history (2002). The 'modern' X11 device (from 2007) uses cairographics and does not use X11 fonts. I suggest you take a look at how R was built and ensure that the cairo-based device is available. Furt

[R] Accessing examplars in apcluster (apcluster package)

2013-04-04 Thread Sachinthaka Abeywardana
Hi, I was wondering how it was possible to access the actual cluster exemplars from the APResult class. Currently it only spits it out onto the terminal if you type the object but there is no other way to see which one is the examplar. Would appreciate any help. Thanks, Sachin [[alterna

[R] X11 font -adobe-helvetica size 15 could not be loaded

2013-04-04 Thread Lisa Daniel
HI All, I got this Error message, when I tried to plot  X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 5 at size 15 could not be loaded sessionInfo() R version 3.0.0 (2013-04-03) Platform: x86_64-unknown-linux-gnu (64-bit) locale:  [1] LC_CTYPE=en_CA.UTF-8   LC_NUMERIC=C   

Re: [R] custom startup/welcome message

2013-04-04 Thread Prof Brian Ripley
On 04/04/2013 21:31, R. Michael Weylandt wrote: On Thu, Apr 4, 2013 at 9:49 AM, lejeczek wrote: yeap, I've done it, I was hoping for a complete customization, and even Rprofile.site adds only to what is being printed by default anyway, I mean that header is always there. R version. untill "

Re: [R] windows to remote R(linux) via putty with X11 forwarding

2013-04-04 Thread Prof Brian Ripley
On 04/04/2013 14:46, lejeczek wrote: hi everybody windows to remote R(linux) via putty with X11 forwarding does not work for me I mean GUI does not, is there a solution for windows->linux.R + GUI ? What do you mean by 'GUI'? R does not have a GUI except on Windows (and as an add-on project,

Re: [R] about subsetting vectors/list in R

2013-04-04 Thread arun
Hi, You could also use: library(seqinr) x1<- rep(c('A','G','C','T'),4) splitseq(x1,frame=0,word=2) #[1] "AG" "CT" "AG" "CT" "AG" "CT" "AG" "CT" splitseq(x1,frame=1,word=2) #[1] "GC" "TA" "GC" "TA" "GC" "TA" "GC"  splitseq(x1,frame=0,word=3) #[1] "AGC" "TAG" "CTA" "GCT" "AGC" A.K. - Orig

Re: [R] question about message

2013-04-04 Thread Jeff Newmiller
a) This is not the RStudio support forum b) Don't post using HTML on this list. It messes up R code. Truly. c) You have quoted a snippet of instructions to follow, but not provided what you actually did. d) You also include errors having to do with knitr and latex, which seem unrelated to the

Re: [R] model.frame: object is not a matrix

2013-04-04 Thread Richard M. Heiberger
When I have a matrix MMM with long column names and short row names, then I will normally display the transpose t(MMM). It will be much easier to read. I will also set the emacs window holding *R* to very wide (150 or so) and then I can see the whole width of the transposed matrix simultaneously.

Re: [R] custom startup/welcome message

2013-04-04 Thread Tyler Rinker
What is your OS? > Fom: michael.weyla...@gmail.com > Date: Thu, 4 Apr 2013 15:31:31 -0500 > To: pelj...@yahoo.co.uk > CC: r-help@r-project.org > Subject: Re: [R] custom startup/welcome message > > On Thu, Apr 4, 2013 at 9:49 AM, lejeczek wrote: > > yeap, I

Re: [R] Extract the accuracy of 10-CV

2013-04-04 Thread Nicolás Sánchez
Anyone? Thanks! 2013/4/4 Nicolás Sánchez > Hello guys! > > I am working with some classifiers ( SVM,C4.5,RNA,etc) using 10-C.V. > > Once I have the model of each one, I make the validation of these models > in one dataset. Then,with my model and the dataset, I extract a confusion > matrix to kn

Re: [R] about subsetting vectors/list in R

2013-04-04 Thread William Dunlap
> > Not super slick but: > > > > by_two <- function(x, collapse = ""){ > >dim(x) <- c(length(x) / 2, 2) > >apply(x, 1, function(y) paste(y, collapse = collapse)) > > } Does that do what you want? > by_two(letters[1:10]) [1] "af" "bg" "ch" "di" "ej" I thought that you wanted [1] "ab"

Re: [R] about subsetting vectors/list in R

2013-04-04 Thread R. Michael Weylandt
On Thu, Apr 4, 2013 at 7:55 PM, Abhishek Pratap wrote: > On Thu, Apr 4, 2013 at 5:53 PM, R. Michael Weylandt > wrote: >> by_two <- function(x, collapse = ""){ >>dim(x) <- c(length(x) / 2, 2) >>apply(x, 1, function(y) paste(y, collapse = collapse)) >> } > > Thanks.. just wondering if this

Re: [R] categorized complete list of R commands?

2013-04-04 Thread R. Michael Weylandt
On Thu, Apr 4, 2013 at 1:54 PM, ivo welch wrote: > > ## must be started with R --vanilla > all.sources <- search() > d <- NULL > for (i in 1:length(all.sources)) { > all.functions <- ls(search()[i]) > N <- length(all.functions) > if (N==0) next > d <- rbind(d, data.frame( src=rep(all.sourc

Re: [R] about subsetting vectors/list in R

2013-04-04 Thread Abhishek Pratap
On Thu, Apr 4, 2013 at 5:53 PM, R. Michael Weylandt < michael.weyla...@gmail.com> wrote: > On Thu, Apr 4, 2013 at 7:46 PM, Abhishek Pratap > wrote: > > Hey Guys > > > > Getting spinned about a slick way to join every 2 entry in a list / > vector > > in R > > > > x=(rep(c('A','G','C','T'),1000)) >

Re: [R] about subsetting vectors/list in R

2013-04-04 Thread R. Michael Weylandt
On Thu, Apr 4, 2013 at 7:46 PM, Abhishek Pratap wrote: > Hey Guys > > Getting spinned about a slick way to join every 2 entry in a list / vector > in R > > x=(rep(c('A','G','C','T'),1000)) > > A G C T A G C T etc > > form another list with entries as > AG CT AG etc Not super slick but: by_two <

[R] about subsetting vectors/list in R

2013-04-04 Thread Abhishek Pratap
Hey Guys Getting spinned about a slick way to join every 2 entry in a list / vector in R x=(rep(c('A','G','C','T'),1000)) A G C T A G C T etc form another list with entries as AG CT AG etc so join the first 2 and so on. Thanks!' '-Abhi [[alternative HTML version deleted]] _

[R] model.frame: object is not a matrix

2013-04-04 Thread Ross Boylan
Over a decade ago there was a problem with model.frame when the variable names were long: https://stat.ethz.ch/pipermail/r-help/2002-August/024492.html I have similar symptoms with R 2.15.3 on Windows 7: Browse[2]> x <- model.matrix(formula(myform), p$data) Error in model.frame.default(object,

[R] question about message

2013-04-04 Thread Tania Patiño
Hello R, could you tell me please, how to fix this issue? There is installed RStudio-2.15.2 and the next steps where follow but the message appears: http://cran.r-project.org/web/packages/RMySQL/INSTALL): > > 1. Download the RMySQL_0.9.tar.gz file to the folder C:\Program > Files\R\R-2.15.1\

Re: [R] custom startup/welcome message

2013-04-04 Thread Jim Lemon
On 04/05/2013 01:49 AM, lejeczek wrote: yeap, I've done it, I was hoping for a complete customization, and even Rprofile.site adds only to what is being printed by default anyway, I mean that header is always there. R version. untill "Type 'q()'.. and R -q silences everything :( Hi lejeczek

Re: [R] Superscript

2013-04-04 Thread Paul Johnson
On Thu, Apr 4, 2013 at 4:39 AM, Shane Carey wrote: > Hi William, > > for (i in one:length(DATA_names)) > if ((grepl("_",DATA_names[i]))=="TRUE") > DATA_names[i]<-f(DATA_names[i])) > > I keep getting an error saying: incompatible types (from symbol to > character) in subassignment type fix >

Re: [R] plot in log scale in both x-axis and y-axis

2013-04-04 Thread capricy gao
Thanks a lot. From: R. Michael Weylandt Cc: "r-help@r-project.org" Sent: Thursday, April 4, 2013 3:41 PM Subject: Re: [R] plot in log scale in both x-axis and y-axis > > I am trying to plot(x,y, log="y"), which gives me log scale on y axis only. I > wond

Re: [R] speedometer charts in R

2013-04-04 Thread andrija djurovic
Hi. Thanks once more for helping me out. Beside that you gave me a nice idea and here is the sample code of dashboard for an R-powered race car that you can't wait to see :) library(animation) library(jpeg) # Original code by Gaston Sanchez # http://www.r-bloggers.com/gauge-chart-in-r/ # Modifie

Re: [R] plot in log scale in both x-axis and y-axis

2013-04-04 Thread R. Michael Weylandt
On Thu, Apr 4, 2013 at 3:35 PM, capricy gao wrote: > > I am trying to plot(x,y, log="y"), which gives me log scale on y axis only. I > wonder if there is way so that I can plot log scale on both of x and y axis. plot(x, y, log = 'xy') Cheers, MW > > Thanks a lot:) > [[alternative HTML

[R] plot in log scale in both x-axis and y-axis

2013-04-04 Thread capricy gao
I am trying to plot(x,y, log="y"), which gives me log scale on y axis only. I wonder if there is way so that I can plot log scale on both of x and y axis. Thanks a lot:) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] custom startup/welcome message

2013-04-04 Thread R. Michael Weylandt
On Thu, Apr 4, 2013 at 9:49 AM, lejeczek wrote: > yeap, I've done it, > I was hoping for a complete customization, > and even Rprofile.site adds only to what is being printed by default anyway, > I mean that header is always there. R version. untill "Type 'q()'.. > and R -q silences everything

Re: [R] error message

2013-04-04 Thread Sarah Goslee
Hi, > I have the same question as Harriet to sent it almost a year ago but could > not find a response.I want to run exploratory factor analysis and after > turning my data into a matrix I want to look at the stats. However I get this > error message "One of your variables is a constant. Consta

Re: [R] custom startup/welcome message

2013-04-04 Thread lejeczek
yeap, I've done it, I was hoping for a complete customization, and even Rprofile.site adds only to what is being printed by default anyway, I mean that header is always there. R version. untill "Type 'q()'.. and R -q silences everything :( On 04/04/13 15:01, Michael Weylandt wrote: On Ap

[R] windows to remote R(linux) via putty with X11 forwarding

2013-04-04 Thread lejeczek
hi everybody windows to remote R(linux) via putty with X11 forwarding does not work for me I mean GUI does not, is there a solution for windows->linux.R + GUI ? regards [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Std. error normalmixEM using boot.se

2013-04-04 Thread Stat Tistician
I tried to post this question two times, each time it seemed to fail, since " An embedded and charset-unspecified text was scrubbed..." So I try it again: I fitted a mixture density of two gaussians two my data. I now want to caluclate the standard errors of the estimates via the boot.se comman

[R] error message

2013-04-04 Thread Helen Sawaya
Hi all, I have the same question as Harriet to sent it almost a year ago but could not find a response.I want to run exploratory factor analysis and after turning my data into a matrix I want to look at the stats. However I get this error message "One of your variables is a constant. Constants a

Re: [R] Creating data frame from individual files

2013-04-04 Thread arun
HI, May be this helps: lst1<- structure(list(File1 = structure(list(ColA = c("A", "B"), ColB = c(2.4, 2.1)), .Names = c("ColA", "ColB"), class = "data.frame", row.names = c(NA, -2L)), File2 = structure(list(colA = c("A", "B"), ColB = c(1.3, 0.4)), .Names = c("colA", "ColB"), class = "data.fram

Re: [R] Better way of writing R code

2013-04-04 Thread Katherine Gobin
Dear Sirs, I sincerely apologize for the blunder at my end. Problem is I was told that one cannot or should not send any ATTACHMENTS. In the past, when I had tried to attach some files and the message was displayed less the attachment. Also, at times it becomes very difficult to attach the csv

Re: [R] categorized complete list of R commands?

2013-04-04 Thread ivo welch
I was thinking simpler, not more clever. ## must be started with R --vanilla all.sources <- search() d <- NULL for (i in 1:length(all.sources)) { all.functions <- ls(search()[i]) N <- length(all.functions) if (N==0) next d <- rbind(d, data.frame( src=rep(all.sources[i], N), index=1:N, fnam

Re: [R] Can package plyr also calculate the mode?

2013-04-04 Thread ramoss
When I run yy <- ddply(all,"ACTIVIT", summarise, mode=mode(COUNTS)) I get : ACTIVITmode XX numeric ZZ numeric & so on. -- View this message in context: http://r.789695.n4.nabble.com/Can-package-plyr-also-calculate-the-mode-tp4663235p

Re: [R] categorized complete list of R commands?

2013-04-04 Thread Bert Gunter
... and how do you (algorithmically) define "categorized"? Seems like a clairvoyant oracle would be required (probably could be used to solve NP complete problems in polynomial time, too!). Or the google folks... In the meanwhile, a slight enhancement to Michael's suggestion might be to first fil

[R] Extract the accuracy of 10-CV

2013-04-04 Thread Nicolás Sánchez
Hello guys! I am working with some classifiers ( SVM,C4.5,RNA,etc) using 10-C.V. Once I have the model of each one, I make the validation of these models in one dataset. Then,with my model and the dataset, I extract a confusion matrix to know the capacity of prediction from the model. And finally

Re: [R] Rgl

2013-04-04 Thread Benjamin Caldwell
Nice, that worked really well. Thanks Duncan *Ben Caldwell* On Sat, Mar 30, 2013 at 1:31 PM, Duncan Murdoch wrote: > On 13-03-30 3:27 PM, Benjamin Caldwell wrote: > >> Dear r users, >> I have two kinds of data I'm trying to represent in Rgl. >> >> The first are measurements of soils: heights,

Re: [R] categorized complete list of R commands?

2013-04-04 Thread R. Michael Weylandt
On Thu, Apr 4, 2013 at 3:57 PM, ivo welch wrote: > > thanks, michael. how do I get all functions, not just my own, that can > possibly be used? It's somewhat ill-defined as functions can be created at any moment. But as a start lapply(search(), ls) might get you going. Though my original ide

Re: [R] Plotting several functions in the same display (again)

2013-04-04 Thread Julio Sergio
Duncan Murdoch gmail.com> writes: > The curve() function is trying to be clever, but it's not. You can > probably get what you want using curve(fi(380)(x), add=TRUE). It treats > the "x" argument specially. > > Duncan Murdoch > Thanks Duncan, Your solution worked perfectly! _

Re: [R] Plotting several functions in the same display (again)

2013-04-04 Thread Duncan Murdoch
On 04/04/2013 11:38 AM, Julio Sergio wrote: To superimpose two functions plots in the same page. The functions L0 and L1, as defined below, I use the following code: # An accumulative normal distribution function with # several parametres f0 <- function(mu, xm, ds, n) { 1 - pnorm((

Re: [R] Superscript

2013-04-04 Thread William Dunlap
for (i in one:length(DATA_names)) if ((grepl("_",DATA_names[i]))=="TRUE") DATA_names[i]<-f(DATA_names[i])) I keep getting an error saying: incompatible types (from symbol to character) in subassignment type fix You didn't say what the DATA_names vector contains. Let's say it is

Re: [R] Superscript

2013-04-04 Thread William Dunlap
Ø what does this piece of the code do: ~(.(\\1)) help("gsub") should have the details. In short, "\\1" it refers to the text matching the 1st parenthesized subpattern in the pattern argument. The pattern was "_(mgkg|ugkg)" so for text "Zn_ugkg" the text matching the first parenthesized subpat

Re: [R] pipe or system command

2013-04-04 Thread William Dunlap
dirname <- "c:/work/raw_data_files" dirlist <- dir(dirname, pattern="\\.txt$", full.names=TRUE) The pattern matches all file names ending with ".txt", full.names=TRUE means to include the directory name at the front of each file name. Look at help("dir") for details. Bill Dunlap Spotfire, TIB

Re: [R] summing vectors

2013-04-04 Thread arun
HI Nicolas, Your dput() looks like corrupted. #changed dat2<- structure(list(Year = c(2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 2001L), Area = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L), Q = c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 1L

Re: [R] Problem quitting

2013-04-04 Thread peter dalgaard
On Apr 4, 2013, at 13:33 , Prof Brian Ripley wrote: > On 04/04/2013 12:17, peter dalgaard wrote: >> >> On Apr 3, 2013, at 23:58 , Julian Wells wrote: >> >>> Can someone explain why all of a sudden I can't quit? >> >> Almost certainly because you have a .Last function that fails. Either get >>

Re: [R] linear model coefficients by year and industry, fitted values, residuals, panel data

2013-04-04 Thread Cecilia Carmo
The problem was my R version. After installing the more recent version the problem is solved. mutate() is much more easier. Thank you. Cecília Carmo De: Peter Ehlers [ehl...@ucalgary.ca] Enviado: quinta-feira, 4 de Abril de 2013 16:29 Para: Cecilia Carmo

[R] Plotting several functions in the same display (again)

2013-04-04 Thread Julio Sergio
To superimpose two functions plots in the same page. The functions L0 and L1, as defined below, I use the following code: # An accumulative normal distribution function with # several parametres f0 <- function(mu, xm, ds, n) { 1 - pnorm((xm-mu)/(ds/sqrt(n))) } f1 <- function(mu,

Re: [R] linear model coefficients by year and industry, fitted values, residuals, panel data

2013-04-04 Thread Peter Ehlers
On 2013-04-04 02:11, Cecilia Carmo wrote: Thank you all. I'm very happy with this solution. Just two questions: I use mutate() with package plyr and it gaves me a error message, is it a new function and my package may be old? Is there any extractor for the R-squared? Thanks again, Cecília Carm

Re: [R] Canadian politcal party colours in ggplot2

2013-04-04 Thread Ista Zahn
Hi John, On Thu, Apr 4, 2013 at 8:25 AM, John Kane wrote: > No wiki was right: That is, the NDP party code #F4A460 is correct. Ah, OK, I thought it was wrong because the NDP party color did not match the color listed at http://www.ndp.ca/logos. > > I have not looked at the ggplot code that clos

[R] pipe or system command

2013-04-04 Thread nalluri pratap
Hi,   In SAS I have something like   %let dirname = c:\work\raw_data_files; filename DIRLIST pipe "dir /B &dirname\*.txt";   Can someone help me to convert this to R. I tried with system and pipe, but It actually creates a file on the disk which I don't like. I just need to have a reference to th

Re: [R] summing vectors/matrices

2013-04-04 Thread Bert Gunter
Nicolas: Start by Helping yourself. Read the docs -- e.g. the "Introduction to R tutorial that ships with R, or one or more of the many that you can find on the Web. -- Bert On Thu, Apr 4, 2013 at 6:17 AM, Nicolas L. Gutierrez wrote: > Hi All, > > I have a large dataset I need to re-structure.

Re: [R] categorized complete list of R commands?

2013-04-04 Thread R. Michael Weylandt
On Apr 4, 2013, at 12:34 AM, ivo welch wrote: > every time I read the R release notes for the next release, I see many > functions that I had forgotten about and many functions that I never knew > existed to begin with. (who knew there were bibtex facilities in R? > obviously, everyone except

Re: [R] Full Documentation of R analysis

2013-04-04 Thread Duncan Murdoch
On 04/04/2013 10:18 AM, will.ea...@gmx.net wrote: Dear all, I would like to fully document an analysis in R including script, output and workspace data. To do this I currently run under Linux $ R CMD BATCH myscript.R This command combines and saves only the script commands

Re: [R] custom startup/welcome message

2013-04-04 Thread Bretschneider SIG-R
Dear lejeczek, Re: > hi everybody > > I wonder if there is a simple way, but not simple would be > ok too, > to customize info/welcome page at session start time? > > what I'd like to do is to put together simple short howto / > dos & don'ts page for users, > I'm thinking it would be great if

Re: [R] Full Documentation of R analysis

2013-04-04 Thread Joshua Wiley
Hi Will, I think that save.image() is the way to go. Regarding the directory, its possible to pass arguments to an R script from the command line, or as long as the R script is in the directory you want the image saved in, just save it to the current working directory. Cheers, Josh On Thu, Ap

Re: [R] summing vectors

2013-04-04 Thread arun
You could also use: library(data.table) dat2<- data.table(dat1) dat2<-dat2[,setdiff(colnames(dat2),"Q"),with=FALSE]  dat2[,lapply(.SD,sum),by=c("Year","Area")] #   Year Area Bin FD #1: 2000    1  50 36 #2: 2001    1   1  4 #3: 2001    2  50 23 A.K. - Original Message - From: arun To:

[R] Full Documentation of R analysis

2013-04-04 Thread will . eagle
Dear all, I would like to fully document an analysis in R including script, output and workspace data. To do this I currently run under Linux $ R CMD BATCH myscript.R This command combines and saves only the script commands and the output ./myscript.Rout. To save the workspace

Re: [R] summing vectors

2013-04-04 Thread arun
HI, I assume that you have a data.frame structure. dat1<- structure(list(Year = c(2000L, 2000L, 2000L, 2000L, 2001L, 2001L, 2001L, 2001L, 2001L), Area = c(1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L), Q = c(1L, 1L, 1L, 1L, 25L, 1L, 1L, 1L, 1L), Bin = c(5L, 10L, 15L, 20L, 1L, 5L, 10L, 15L, 20L), FD = c(0

Re: [R] Superscript

2013-04-04 Thread Shane Carey
Hi, Thanks for your reply, my names column has since been up dated to the following A_mgkg, L_., B_mgkg, S_. etc. And I need the ouput as folllows: -1 A (mg kg ) L (%) -1 B (mg kg ) S (%) I used the function first created by William and then applied lapply and then tr

Re: [R] custom startup/welcome message

2013-04-04 Thread Michael Weylandt
On Apr 4, 2013, at 6:20, lejeczek wrote: > hi everybody > > I wonder if there is a simple way, but not simple would be > ok too, > to customize info/welcome page at session start time? Probably easiest to do it by way of some cat() calls in your .Rprofile. See ?Startup for details. MW >

Re: [R] help with kriging interpolation

2013-04-04 Thread David L Carlson
Take a look at package geoR. -- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf

[R] pgam package

2013-04-04 Thread kia
Hi, R-help. ?pgam package? Dear colleagues, whether I understand rightly that in the GAM (pgam package), the regression coefficients are interpreted in the scale of intervals, such as "when the predictor changes on 1, then the average response changes on b"? (not in multiplicatively manner…) Iva

Re: [R] a question about clustering

2013-04-04 Thread David L Carlson
If you know what the groups are, why do you want to use cluster analysis? You haven't told us what the goal of your analysis is. If it is to find combinations of the variables A:F that will predict to what group an object belongs, you probably want discriminant analysis. If you are trying to find g

[R] summing vectors/matrices

2013-04-04 Thread Nicolas L. Gutierrez
Hi All, I have a large dataset I need to re-structure. It looks something like this: YearAreaQBinFD20001150200011101200011152320001120122000112512000215120002110 6200021151120002120132000212532000125020001210120001215232000122012200012251 20002251200022103200022151220002220132000222532001…2011

Re: [R] Better way of writing R code

2013-04-04 Thread Gabor Grothendieck
On Thu, Apr 4, 2013 at 9:32 AM, Adams, Jean wrote: > Katherine, > > You should cc the R-help on all correspondence. > The more eyes that see your query, the quicker and probably the better the > response will be. > Send your message as plain text with no attachments ... so, include your > code, an

[R] summing vectors

2013-04-04 Thread Nicolas L. Gutierrez
Hi All, Year Area Q Bin FD I have a large dataset I need to re-structure. It looks something like this: 2000 1 1 5 0 2000 1 1 10 1 2000 1 1 15 23 2000 1 1 20 12 2000 1 1 25 1 2000 2 1 5 1 2000 2 1 10 3 2000 2 1 15 15 2000 2 1 20 11 2000 2 1 25 3 2000 1 2 5 0 2000 1 2 10 1 2000 1

[R] custom startup/welcome message

2013-04-04 Thread lejeczek
hi everybody I wonder if there is a simple way, but not simple would be ok too, to customize info/welcome page at session start time? what I'd like to do is to put together simple short howto / dos & don'ts page for users, I'm thinking it would be great if it was possible many thanks

[R] Std. error of normalmixEM with boot.se

2013-04-04 Thread Stat Tistician
I fitted a mixture denstiy of two gaussians two my data. I now want to calculated the standard errors of the estimates via the boot.se command of the mixtools package. My question is now, if the output is correct? It seems a bit odd to me, so is this correct what I am doing and can I rely on the va

[R] prcomp() and varimax()

2013-04-04 Thread Mike Amato
Hello, I am attempting to do a principal components analysis on 15 survey items. I want to use a varimax rotation on the retained components, but I am dubious of the output I am getting, and so I suspect I am doing something wrong. I proceed in the following steps: 1) use prcomp() to inspect

Re: [R] Better way of writing R code

2013-04-04 Thread Adams, Jean
Katherine, You should cc the R-help on all correspondence. The more eyes that see your query, the quicker and probably the better the response will be. Send your message as plain text with no attachments ... so, include your code, and use dput() to share some example data. Jean On Thu, Apr 4, 2

Re: [R] Can package plyr also calculate the mode?

2013-04-04 Thread ramoss
When I put in mode=mode(COUNTS) I get the value "numeric" as an answer. I think it's giving me the data type not the mode. -- View this message in context: http://r.789695.n4.nabble.com/Can-package-plyr-also-calculate-the-mode-tp4663235p4663301.html Sent from the R help mailing list archive at

Re: [R] Superscript

2013-04-04 Thread arun
Hi, DATA_names<-c("A_mgkg","B_mgkg","C_mgkg","D_mgkg","E_mgkg","F_mgkg","G_mgkg","H mgkg")  lapply(DATA_names,function(x) if(grepl("_",x)) f(x) else x)[1:2] #[[1]] #A ~ (mg ~ kg^{ #    -1 #}) #[[2]] #B ~ (mg ~ kg^{  #   -1 #})  f("Na_mgkg") #Na ~ (mg ~ kg^{ #    -1 #}) A.K. - Original Me

Re: [R] Canadian politcal party colours in ggplot2

2013-04-04 Thread John Kane
No wiki was right: That is, the NDP party code #F4A460 is correct. I have not looked at the ggplot code that closely yet but is there a chance that scale_color_manual(values = fed.party.colors) is cycling through the vector? At the moment my second shot at the graph has dropped the orignal c

Re: [R] Canadian politcal party colours in ggplot2

2013-04-04 Thread Ista Zahn
Hey John, Yeah, I guess my blind trust in wikipedia got me in trouble this time. The wikipedia colors are not the official colors, or maybe they just contain errors. If you can find another website with a more authoritative list you could adapt the technique. Or maybe wikipedia is close enough. B

Re: [R] Canadian politcal party colours in ggplot2

2013-04-04 Thread John Kane
Excellent. I never thought of something like that. Clearly I need to look into the XML package more closely. The peculiar NDP orange comes through just great though for other readers, your example seems to assign the Canadian Alliance colours to the NDP. Quelle horreur! John Kane Kings

Re: [R] E-learning environment for R

2013-04-04 Thread Matthieu Stigler
Hi Pekka There was last semester a online class on coursera.org, given by Roger Peng: https://www.coursera.org/course/compdata I am afraid however that class won't be given that semester, but maybe it is still possible to access the archives, video and exercises? Best Matthieu On 28/03/2013 0

Re: [R] Help for bootstrapping‏

2013-04-04 Thread Mui Boon Loong
As attached is the txt file for the code. Regards,BL > Date: Thu, 4 Apr 2013 03:19:47 -0800 > From: jrkrid...@inbox.com > Subject: RE: [R] Help for bootstrapping‏ > To: boon_lo...@hotmail.com; r-help@r-project.org > > It looks like you formatted the code in html and it is essentially impossible

Re: [R] help with kriging interpolation

2013-04-04 Thread Jon Olav Skoien
I am not sure which soil example you refer to (meuse?), but it should anyway be fairly easy to get a single interpolation, just give a single point as the prediction location. The easiest is probably to start with the automap package or the intamap package, where the variogram fitting etc is do

Re: [R] Problem quitting

2013-04-04 Thread Prof Brian Ripley
On 04/04/2013 12:17, peter dalgaard wrote: On Apr 3, 2013, at 23:58 , Julian Wells wrote: Can someone explain why all of a sudden I can't quit? Almost certainly because you have a .Last function that fails. Either get rid of it, or try q("n", runLast=FALSE). I don't think so. This seems

Re: [R] place x-axis labels at bin edges in a histogram

2013-04-04 Thread Shane Carey
Yup, that did the trick. Thanks a mil On Thu, Apr 4, 2013 at 12:10 PM, Rui Barradas wrote: > Hello, > > Try the following. > > > h <- hist(rnorm(100), xaxt = "n") > axis(1, at = h$breaks) > > > Hope this helps, > > Rui Barradas > > Em 04-04-2013 11:44, Shane Carey escreveu: > > Hi, >> >> I wo

Re: [R] Help for bootstrapping‏

2013-04-04 Thread John Kane
It looks like you formatted the code in html and it is essentially impossible to read. Can you resend in plain text? Thanks John Kane Kingston ON Canada > -Original Message- > From: boon_lo...@hotmail.com > Sent: Thu, 4 Apr 2013 15:14:05 +0800 > To: r-help@r-project.org > Subject: [R

Re: [R] Problem quitting

2013-04-04 Thread peter dalgaard
On Apr 3, 2013, at 23:58 , Julian Wells wrote: > Can someone explain why all of a sudden I can't quit? Almost certainly because you have a .Last function that fails. Either get rid of it, or try q("n", runLast=FALSE). -pd > >> q("n") returns > > Error in gzfile(file, "wb") : cannot open th

Re: [R] place x-axis labels at bin edges in a histogram

2013-04-04 Thread Rui Barradas
Hello, Try the following. h <- hist(rnorm(100), xaxt = "n") axis(1, at = h$breaks) Hope this helps, Rui Barradas Em 04-04-2013 11:44, Shane Carey escreveu: Hi, I would like to places x-axis labels at the edge of bins on a histogram, i.e. the min value at first bin edge (left hand side) an

[R] place x-axis labels at bin edges in a histogram

2013-04-04 Thread Shane Carey
Hi, I would like to places x-axis labels at the edge of bins on a histogram, i.e. the min value at first bin edge (left hand side) and max at the last bin edge (right hand side). As it stands, it places the values in the centre of each bin. Thanks -- Shane [[alternative HTML version

Re: [R] Superscript

2013-04-04 Thread Shane Carey
Hi William, Im trying to run this function within a for loop as follows: f <- function (name) { # add other suffices and their corresponding plotmath expressions to the list env <- list2env(list(mgkg = bquote(mg ~ kg^{-1}), ugkg = bquote(mu * g ~ kg^{-1})),

[R] Help for bootstrapping‏

2013-04-04 Thread Mui Boon Loong
I have a set of data for US t-bill returns and US stock returns frm 1980-2012. I am trying to bootstrap the data and obtain the minimum variance portfolio and repeat this portfolio 1000 times. However I am unable to get the correct code function for the minimum variance portfolio. When I tried t

Re: [R] linear model coefficients by year and industry, fitted values, residuals, panel data

2013-04-04 Thread Cecilia Carmo
Thank you all. I'm very happy with this solution. Just two questions: I use mutate() with package plyr and it gaves me a error message, is it a new function and my package may be old? Is there any extractor for the R-squared? Thanks again, Cecília Carmo

Re: [R] help with kriging interpolation

2013-04-04 Thread Anupam Tyagi
You may want to look at a GIS related package in R. The soil sampling example makes sense. Anupam. On 4/4/13, Jeff Newmiller wrote: > I am no expert on kriging, but I do know that your question desperately > needs a reproducible example [1] that illustrates the actual problem you are > encounte

Re: [R] Superscript

2013-04-04 Thread Shane Carey
Hi William, Thanks for this piece of code, it does the trick perfectly, what does this piece of the code do: ~(.(\\1)) in the following section: bquoteExpr <- parse(text=gsub(pattern, "~(.(\\1))", name))[[1]] Thanks again On Wed,

[R] Finetuning a PVClust plot

2013-04-04 Thread Bob Green
Hello, The code below produces a plot in colour, however, the results will typically be printed in black and white. I am hoping for advice regarding how the I might obtain a plot in which the red au values are in bold lettering and the green bp plots are italicised. The text in the plot is to

Re: [R] help with kriging interpolation

2013-04-04 Thread Jeff Newmiller
I am no expert on kriging, but I do know that your question desperately needs a reproducible example [1] that illustrates the actual problem you are encountering. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example --

Re: [R] Deviance in Zero inflated models

2013-04-04 Thread Anupam Tyagi
The terminology could be specific to discipline. Check the Econometrics and Finance views. There isn't a health econometrics / statistics view yet which may have had this information, though you could look package "Design" and the author's web-page. Anirban Basu's and co-autors webpages at U Chicag

Re: [R] Deviance in Zero inflated models

2013-04-04 Thread Achim Zeileis
On Wed, 3 Apr 2013, Lia McKinnon wrote: Dear list, I am running some zero inflated models and would like to know what the deviance of the models. Unlike running a normal GLM where the deviance is displayed in the summary all that is displayed in a summary of the zero inflated model is the lo

  1   2   >