Re: [R] Sub- or superscript in factorial variable - possible?

2012-09-15 Thread David Winsemius
On Sep 15, 2012, at 7:15 PM, mcg wrote: > Hello R-users, > > I would like to use subscript in chemical formulas for the different > treatments in a boxplot. > Fot title, xlab and ylab sub- and superscript is no problem, but for the > different treatments of the following example I cannot get s

Re: [R] Post by non-member to a members-only list

2012-09-15 Thread David Winsemius
On Sep 15, 2012, at 7:17 PM, mcg wrote: > Dear moderator; > > I'm on the R-Mailing list with the same (giepe...@gmail.com) email address, > still I get the "Post by non-member..." message. Am I not a member than? It appears you are currently subscribed as one "6813 Non-digested Members". --

[R] Sub- or superscript in factorial variable - possible?

2012-09-15 Thread mcg
Hello R-users, I would like to use subscript in chemical formulas for the different treatments in a boxplot. Fot title, xlab and ylab sub- and superscript is no problem, but for the different treatments of the following example I cannot get subscript. Example: weight <- c(6,5,7,2,7,3,9,4,2,7

[R] Post by non-member to a members-only list

2012-09-15 Thread mcg
Dear moderator; I'm on the R-Mailing list with the same (giepe...@gmail.com) email address, still I get the "Post by non-member..." message. Am I not a member than? Cheers, Michael __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

Re: [R] Interpretation of result in R

2012-09-15 Thread Rolf Turner
This is not actually a question about R but rather about understanding generalized linear models. If you are going to use such models you need to learn what they are and what they mean. The book "An Introduction to Generalized Linear Models" by Annette Dobson and Adrian Barnett (Chapman and Hal

Re: [R] qplot: plotting precipitation data

2012-09-15 Thread John Kane
Thanks for the data. It makes things much easier. Do you want a bar chart (i.e. geom = bar in qplot or geom_bar in ggplot)? That sounds like what you mean when you speak of rectangles. If so try this ggplot) command -- I almost never use qplot() so I am not quite sure how to specify it there

Re: [R] equivalent or "rowspan" in R

2012-09-15 Thread R. Michael Weylandt
On Sat, Sep 15, 2012 at 11:09 PM, Francesco Montanari wrote: > Hi all, > > I'm new to R and to this mailing list, > I'd need to display, in a 2x2 window (mfrow = c(2, 2)), a graph that is 2 > rows tall (so with 2 other graphs at his right). > > Here is an example of what I mean > http://www.stefa

[R] equivalent or "rowspan" in R

2012-09-15 Thread Francesco Montanari
Hi all, I'm new to R and to this mailing list, I'd need to display, in a 2x2 window (mfrow = c(2, 2)), a graph that is 2 rows tall (so with 2 other graphs at his right). Here is an example of what I mean http://www.stefandahlen.com/pictures/rowspan.gif in html there is an attribute called rowspa

[R] Dimension Reduction Using MCA

2012-09-15 Thread Chris Cusumano
Hello, I've been working with categorical, binary data and have been using a combination of both FactoMiner and missMDA to impute the binary data set. I have had success imputing the data set and I am now working with a complete set. Now, I wish to reduce the dimensionality of the data and do so

Re: [R] create new variable with ifelse? (reproducible example)

2012-09-15 Thread arun
Hi, Try this: > str(rep_data) #'data.frame':    6 obs. of  4 variables: # $ id1 : Factor w/ 6 levels "10016_a2",..: 1 2 3 4 5 6 # $ id2 : Factor w/ 2 levels "fairly","very": 2 1 2 2 2 1 # $ know    : Factor w/ 1 level "well": 1 1 1 1 1 1 # $ getalong: int  4 NA 3 5 5 5  rownames(rep_dat

Re: [R] plotting points on a map, assigning vectors to values from dataset

2012-09-15 Thread Neele
It worked! Thank you very much! I did not know about about the alphabetical order - trying to run before I can walk. If I can ever help (South American linguistics is my field), let me know! You certainly helped me bringing my dissertation into a better shape! Best wishes, Neele > Typo corre

Re: [R] How to convert the output of tapply() so that it has the same order as the input?

2012-09-15 Thread arun
Hi, If you do not want the change the row order or column order, ddply() may be helpful: library(plyr) new1<-ddply(x,.(x1,x2),function(x) x$value) unlist(list(new1$V1,new1$V2)) #[1] 0.2655087 0.3721239 0.5728534 0.9082078 0.2016819 0.8983897 0.9446753 #[8] 0.6607978 A.K. - Original Message

Re: [R] create new variable with ifelse? (reproducible example)

2012-09-15 Thread Ted Harding
[See at end] On 15-Sep-2012 20:36:49 Niklas Fischer wrote: > Dear R users, > > I have a reproducible data and try to create new variable "clo" is 1 if > know variable is equal to "very well" or "fairly well" and getalong is 4 or > 5 > otherwise it is 0. >[A] rep_data<- read.table(header=TRUE, te

Re: [R] R CMD check and browser

2012-09-15 Thread R. Michael Weylandt
On Sat, Sep 15, 2012 at 8:56 PM, Christian Hoffmann wrote: > Hi, > > Every time I do > > system("R CMD check mypackckage" > > the process executes a help.start(). Why does this happen? > Hi Christian, I'm afraid I can't replicate this with the packages I keep local copies of and installed versio

Re: [R] create new variable with ifelse? (reproducible example)

2012-09-15 Thread Milan Bouchet-Valat
Le samedi 15 septembre 2012 à 23:36 +0300, Niklas Fischer a écrit : > Dear R users, > > I have a reproducible data and try to create new variable "clo" is 1 if > know variable is equal to "very well" or "fairly well" and getalong is 4 or > 5 > otherwise it is 0. > > rep_data<- read.table(header=

[R] create new variable with ifelse? (reproducible example)

2012-09-15 Thread Niklas Fischer
Dear R users, I have a reproducible data and try to create new variable "clo" is 1 if know variable is equal to "very well" or "fairly well" and getalong is 4 or 5 otherwise it is 0. rep_data<- read.table(header=TRUE, text=" id1id2know getalong 10016_a1 1001

[R] R CMD check and browser

2012-09-15 Thread Christian Hoffmann
Hi, Every time I do system("R CMD check mypackckage" the process executes a help.start(). Why does this happen? Cheers Christian -- Christian W. Hoffmann, CH - 8915 Hausen am Albis, Switzerland Rigiblickstrasse 15 b, Tel.+41-44-7640853 c-w.hoffm...@sunrise.ch, christ...@echoffmann.ch, www.ec

Re: [R] $ operator is invalid for atomic vectors

2012-09-15 Thread R. Michael Weylandt
> 2) Make the vector a list. I don't know if there are side-Effects to > this, but perhaps it's just the anxiety of a Java-Programmer who isn't > used to the somewhat easy-going way R deals with classes: >class(dataf2) <- "list" Indeed, there are _many_ side effects to this and you really

Re: [R] $ operator is invalid for atomic vectors

2012-09-15 Thread mlell08
On 14.09.2012 22:16, Steve Lianoglou wrote: > Hi, > > On Fri, Sep 14, 2012 at 2:33 PM, agrins wrote: >> HI all- >> >> I have used this .fun in S+ without a problem however, in R when I run this >> code to generate multiple graphs: >> >> trendplot<-function(datafr,dataf2, abbrev="", titlestr="", >

Re: [R] How to convert the output of tapply() so that it has the same order as the input?

2012-09-15 Thread Marius Hofert
Dear Bill, Thanks a lot for your quick reply, that was exactly what I was looking for. Cheers, Marius William Dunlap writes: > Does ave() do what you want? > y. <- ave(x$value, x$x1, x$x2, FUN=function(x)x) > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com > >

[R] Interpretation of result in R

2012-09-15 Thread lpchre
I am trying to do a quasipoisson regression to know if the frequency of drinking of my subject is related to temperature. The problem is that I'm not sure how to interpret my result. 1) Since my result is signifiant, can I tell that the frequency of drinking of my subject increase linearly or expo

Re: [R] [newbie] aggregating table() results and simplifying code with loop

2012-09-15 Thread Davide Rizzo
Thanks Rui, thanks John for your very different solutions. I'll try to break my questions into smaller steps following your tips. However, not everything is clear for me... so before giving you a feed-back I need to study further your answers. For the moment I could specify that I'm looking for th

Re: [R] plotting points on a map, assigning vectors to values from dataset

2012-09-15 Thread David L Carlson
Typo correction - brackets around pch[] and bg[]: points(map$longitude, map$latitude, pch=pch[as.numeric(map$number)], col="black", bg=bg[as.numeric(map$number)], cex=1.5) --- David > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org

Re: [R] how to view only readings of a selected data from a column while the other columns remain

2012-09-15 Thread arun
HI, If I understand it correctly, try this: dat1<-read.table(text=" Year  Market    Winner  BID   1990    ABC    Apple  0.1260   1990    ABC    Apple    0.1395   1990    EFG    Pear  0.1350   1991    EFG    Apple   

[R] qplot: plotting precipitation data

2012-09-15 Thread Hermann Norpois
Dear list, I wish to plot chromatin precipitation data: I would like to have a rectangles (x:end-start, y:peak) but I do not have an idea how to define x (in terms of qplot syntax) and to choose the correct geom. mydata is a subset of a larger file. > mydata chromstart end peak

Re: [R] Plotting DMAs (Direct Marketing Areas)

2012-09-15 Thread Bhupendrasinh Thakre
To the best of my knowledge. DMAs are very specific to the companies. If you have the long and lat data then it's easy to use some of the package to draw them and maps is one of them. Best Regards, Bhupendrasinh Thakre On Sep 14, 2012, at 5:18 PM, Josh Browning wrote: > Hey useRs! > > Do a

Re: [R] plotting points on a map, assigning vectors to values from dataset

2012-09-15 Thread David L Carlson
You didn't include the data so we can't really test anything, but you can simplify things quite a bit by replacing the pch= and bg= lines with pch <- c(24, 23, 22, 21) bg <- c("grey24", "black", "grey77", "white") map$number is a factor which means your categories default to alphabetical order

Re: [R] How to convert the output of tapply() so that it has the same order as the input?

2012-09-15 Thread William Dunlap
Does ave() do what you want? y. <- ave(x$value, x$x1, x$x2, FUN=function(x)x) Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Marius Hofert > Sent: Saturday, Septemb

[R] How to convert the output of tapply() so that it has the same order as the input?

2012-09-15 Thread Marius Hofert
Hi, I try to apply a function to subsets of a data.frame. tapply() does the job, but the as output, I am looking for a vector (not an array/matrix) ordered in the same way as the original data, so I can simply cbind the result to the original data.frame. Below is a minimal example. I know that th

Re: [R] [newbie] aggregating table() results and simplifying code with loop

2012-09-15 Thread John Kane
I have not seen any replies to your questions so I will suggest an approach that may work if I can get a function to work. If I understand what you want, you have a pattern something like this: pattern1 <- c("2Ma", "no2Ma","no2Ma", "no2Ma","no2Ma") pattern2 <- c("no2Ma", 'no2Ma', "no2Ma", "no

Re: [R] how to view only readings of a selected data from a column while the other columns remain

2012-09-15 Thread David Winsemius
On Sep 15, 2012, at 2:22 AM, kangam3 wrote: > Hi Friends > > I am new here and have a problem > > Year Market Winner BID > 1 1990ABC Apple 0.1260 > 2 1990ABC Apple 0.1395 > 3 1990EFG Pear

Re: [R] Error when using Bagplot function

2012-09-15 Thread Uwe Ligges
On 15.09.2012 08:29, mandamate1 wrote: Hi, I am using the bagplot function within the aplpack package and often get this error: Error in chull(pg[, 1], pg[, 2]) : NA/NaN/Inf in foreign function call (arg 2) Here's an example of data for which this happens: bagplot(c(-4.66, -2.62, -3.65 ,-

Re: [R] how to view only readings of a selected data from a column while the other columns remain

2012-09-15 Thread Rui Barradas
Homework. There's a no homework policy, but see ?aggregate. Rui Barradas Em 15-09-2012 10:22, kangam3 escreveu: Hi Friends I am new here and have a problem Year Market Winner BID 1 1990ABC Apple 0.1260 2 1990ABC Apple

Re: [R] how to view only readings of a selected data from a column while the other columns remain

2012-09-15 Thread John Kane
This looks a lot like homework. However here is a hint ABD1990 <- subset(xx, Year == 1990 & Market == "ABC") John Kane Kingston ON Canada > -Original Message- > From: jowe.tjioe.2...@business.smu.edu.sg > Sent: Sat, 15 Sep 2012 02:22:42 -0700 (PDT) > To: r-help@r-project.org > Subject:

Re: [R] p-values in agricolae pearson correlation

2012-09-15 Thread John Kane
I have never used the package but a quick look at the manual suggests a number of corrections for multiple correlatins so you probably should look into it. See "kruskal" in the manual for a start. John Kane Kingston ON Canada > -Original Message- > From: amy_kirk...@yahoo.co.uk > Sent

Re: [R] calculate within-day correlations

2012-09-15 Thread Joshua Ulrich
On Fri, Sep 14, 2012 at 6:14 PM, emorway wrote: > Hi Joshua, > > I was attempting to work with your code on the larger datasets, which I have > to read in with 'read.table', but I've apparently missed something. When I > attempt to massage the data.frame a bit in the code below, as.POSIXct drops

[R] p-values in agricolae pearson correlation

2012-09-15 Thread Ishjo
I have used the correlation analysis (pearson) in the agricolae package to analyse my data and got unexpectedly low p-values (therefore making many more highly significant correlations in my data than I had expected). I am wondering if the p-values given should be subtracted from 1 to give the real

[R] how to view only readings of a selected data from a column while the other columns remain

2012-09-15 Thread kangam3
Hi Friends I am new here and have a problem Year Market Winner BID 1 1990ABC Apple 0.1260 2 1990ABC Apple 0.1395 3 1990EFG Pear 0.1350 4 1991EFG Apple 0

[R] lmPerm p-values and multiple testing

2012-09-15 Thread Aldo Córdova Palomera
I've started using lmPerm in order to perform regressions in R. The equation I want to fit has the form: out3 <- lmp(outcome ~ bin1 + bin2 + cont1 + cont2, perm="Exact") Where "outcome" is a non-normally distributed continuous variable, and bin* and cont are binary and continuous regressors (simi

[R] Error when using Bagplot function

2012-09-15 Thread mandamate1
Hi, I am using the bagplot function within the aplpack package and often get this error: Error in chull(pg[, 1], pg[, 2]) : NA/NaN/Inf in foreign function call (arg 2) Here's an example of data for which this happens: bagplot(c(-4.66, -2.62, -3.65 ,-3.07 ,-4.91, -4.56 ,-3.79, -3.10, -3.01),

Re: [R] tail a file in R

2012-09-15 Thread R. Michael Weylandt
On Sat, Sep 15, 2012 at 2:27 AM, Jim Green wrote: > Greetings, > > not sure tail in R can tail a file as documented here > http://rss.acs.unt.edu/Rdoc/library/R.basic/html/tail.html > > but when I tried my R version 2.14.2 it doesn't work. > Note that that "tail" is not the same as utils::tail tha