[R] read htm table error

2012-08-09 Thread Lay, Kiung
Hi I am using Version R 2.15 and I haven't been able read html table. Following is my code and error message. Error in htmlParse(doc) : error in creating parser for http://en.wikipedia.org/wiki/Brazil_national_football_team theurl <- "http://en.wikipedia.org/wiki/Brazil_national_football_team

[R] Using unicode symbol has unexpected results in levels of factor object

2012-08-09 Thread Wyatt, Kristin M
Dear all, When I use a unicode symbol in the labels for a factor object, the corresponding level does not display as expected. However, using levels() on the factor returns the desired output. I noticed the discrepancy when the legend labels from a call to ggplot() did not display the desired s

[R] How to draw clock in R ?

2012-08-09 Thread Manish Gupta
0 down vote favorite I am working on R and trying to draw a clock using a pie chart. code: pie(c(25,20,15,10,10,30),labels = c(1,2,3,4,5,6,7,8,9,10,11,12), col=rainbow(length(lbls)), clockwise = TRUE, init.angle = 90) but i need all 12 labels to be there independent of no of segments i

[R] How to overlap pie chart with same radius?

2012-08-09 Thread Manish Gupta
Hi, i am overlapping 2pie chart with same radius. 1. with labels 2. without labels. Output pie chart 2 with label of first. http://r.789695.n4.nabble.com/file/n4639723/Ist_Pie.png http://r.789695.n4.nabble.com/file/n4639723/IInd_Oie.png output: http://r.789695.n4.nabble.com/file/n4639

Re: [R] help to program my function

2012-08-09 Thread Petr PIKAL
I am not allowed to connect to Nabble from work, sorry. Petr > > hi peter the pdf folder is in > http://r.789695.n4.nabble.com/file/n4639434/aj.pdf > > > > -- > View this message in context: http://r.789695.n4.nabble.com/help-to- > program-my-function-tp4639434p4639629.html > Sent from the R

Re: [R] NADA Package: Referencing Data Frame Columns

2012-08-09 Thread Petr PIKAL
Hi > > > Specifically, since it has only a single detection indicator column > > (ceneq1), it implies that within any single sample either all the analytes > > were detected, or all were not. Not what I would expect. > > Don, > >I have been thinking about this and wondered whether the cast

Re: [R] help, please! matrix operations inside 3 nested loops

2012-08-09 Thread Fridolin
thank you for your help. my input data looks like this (tab separated): Ind.nr. Pop.nr. scm266 rms1280 scm247 rms1107 1 101 305 318 222 135 1 101 305 318 231 135 2 101 305 313 999 96 2 101 305 321 999 130 3

Re: [R] How to draw clock in R ?

2012-08-09 Thread Jim Lemon
On 08/09/2012 03:43 PM, Manish Gupta wrote: 0 down vote favorite I am working on R and trying to draw a clock using a pie chart. code: pie(c(25,20,15,10,10,30),labels = c(1,2,3,4,5,6,7,8,9,10,11,12), col=rainbow(length(lbls)), clockwise = TRUE, init.angle = 90) but i need all 12 labe

Re: [R] Using unicode symbol has unexpected results in levels of factor object

2012-08-09 Thread peter dalgaard
On Aug 9, 2012, at 06:53 , Wyatt, Kristin M wrote: > Dear all, > > When I use a unicode symbol in the labels for a factor object, the > corresponding level does not display as expected. However, using levels() on > the factor returns the desired output. I noticed the discrepancy when the > le

[R] Zoo object problem: problem when I attempt to create a zoo object of only one column

2012-08-09 Thread jpm miao
Hi, Part of my program is to calculate the number of time series in a zoo object. It works well if it has more than one time series, but it fails if it has only one. How can I access the number of column (i.e. the number of time series) when I have only one column? Why is the number of an objec

Re: [R] How to overlap pie chart with same radius?

2012-08-09 Thread Jim Lemon
On 08/09/2012 04:28 PM, Manish Gupta wrote: Hi, i am overlapping 2pie chart with same radius. 1. with labels 2. without labels. Output pie chart 2 with label of first. http://r.789695.n4.nabble.com/file/n4639723/Ist_Pie.png http://r.789695.n4.nabble.com/file/n4639723/IInd_Oie.png output:

Re: [R] R versus SAS

2012-08-09 Thread Rolf Turner
On 09/08/12 14:35, Yihui Xie wrote: The Department of Redundancy Department can "recompensate"... Ye :-) cheers, Rolf __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

Re: [R] help, please! matrix operations inside 3 nested loops

2012-08-09 Thread Fridolin
SORRY it should be: Fridolin wrote > > for (s in 3:6) { #walks though the matrix colum by colum, starting at > colum 3 > for (z1 in 1:5) { #for each current colum, take one row (z1)... > for (z2 in 1:5) { #...and compare it to another row (z2) of the > current colum > error is go

Re: [R] decimal points midline

2012-08-09 Thread Jim Lemon
On 08/09/2012 04:52 AM, array chip wrote: Hi, does anyone know how to make decimal points midline when plotting? The journal to which we are going to submit a manuscript require this particular formatting, and it gives direction how to do this on PC: hold down ALT key and type 0183 on the numb

Re: [R] Zoo object problem: problem when I attempt to create a zoo object of only one column

2012-08-09 Thread Achim Zeileis
On Thu, 9 Aug 2012, jpm miao wrote: Hi, Part of my program is to calculate the number of time series in a zoo object. It works well if it has more than one time series, but it fails if it has only one. How can I access the number of column (i.e. the number of time series) when I have only one

Re: [R] R versus SAS

2012-08-09 Thread Jim Lemon
On 08/09/2012 07:17 AM, Rolf Turner wrote: ... P. S. There is no such word as "recompensate". Thanks to R, the internet and pretentious, semi-literate public servants around the world, there probably is now. Jim __ R-help@r-project.org mailing list

Re: [R] Calculating percentages across multiple columns

2012-08-09 Thread Rui Barradas
Hello, If I understand it well, the following should do it. dd <- subset(f, sold == 1) at <- with(dd, bid == purchase) mean(at) # wanted value Hope this helps, Rui Barradas Em 09-08-2012 01:52, Daisy Englert Duursma escreveu: Your question is very unclear.Can you provide a better question

Re: [R] help, please! matrix operations inside 3 nested loops

2012-08-09 Thread Fridolin
all problems solved. thank you for your help! for the sake of completeness, here my solution: #1) read in data: daten<-read.table('K:/Analysen/STRUCTURE/test.txt', header=TRUE, sep="\t") daten<-as.data.frame(daten) #2) create empty matrix: indxind<-matrix(0,nrow=617, ncol=617) #indxind[1:20,1:19]

[R] Count not NA cells in RasterStack

2012-08-09 Thread Alexey Ch
Good Day! I have RasterLayers list with same resolution. (31 items: 720 x 1440) . I need to get RasterLayer with average values without NA value. How I can do that? For example: We have 3 RasterLayers 1 2 34 2 3 NA 3 NA 1 3NA 1 2 34 2NA NA 3 NA 1 3

Re: [R] Installing HDF5 package

2012-08-09 Thread sihemsaad
As Uwe Ligges-3 guessed, i am working on a Windows Station. I also tried the link Uwe Ligges-3 posted and I think it worked Thank you all for your answers! -- View this message in context: http://r.789695.n4.nabble.com/Installing-HDF5-package-tp4639633p4639728.html Sent from the R help mailin

[R] How does the cm function under package "actuar" works?

2012-08-09 Thread chris123
Dear all, I have a question about how the function "cm" works? It can be found under the package actuar. In particular, I want to use it to apply the Buhlmann-Straub model into some data. I am using the example that R has in the help page for cm. I use the dataset hachemeister and then the code

Re: [R] Accents and special character using hwriter (on Windows)

2012-08-09 Thread ramonovelar
Thanks David, but this is not easy to me as these string are already in my data (labels, variable strings). Well, I still can make some script to do it, but it's messy, maybe I want make a Word file (not a html through Word) after this. When a HTML page has a UTF-8 charset it works ok with characte

[R] Treemap lost data

2012-08-09 Thread KingKazma
First: Im sorry for my bad english ;-) I use "portfolio" to create treemaps with "R". I've got a .csv dataset of all the schools in my city, containing 6 variables each with 1469 lines of data. When I create a treemap, 3 of these schools were not taken into account by "R". I dont know why. It do

[R] Factor moderators in metafor

2012-08-09 Thread John Hodgson
I'm puzzled by the behaviour of factors in rma models, see example and comments below. I'm sure there's a simple explanation but can't see it... Thanks for any input John Hodgson - code/selected output - library(metafor) ##Set up data

Re: [R] How to draw clock in R ?

2012-08-09 Thread Manish Gupta
Great! It works fine for me. But i have one query. In my clock i have only 10 points so i am using as follows. pie(c(25,20,15,10,10,30)) floating.pie(0,0,c(25,20,15,10,10,30)) pie.labels(0,0,seq(0,19*pi/10,by=pi/5),c(3,2,1,0,9,8,7,6,5,4)*10,radius=1.1,border=NA) But format is not correct. I tri

[R] Ctree plot

2012-08-09 Thread rodrock
HI everybody! Has anybody figure out how would be possible to plot several ctree plots beside each other? I would really appreciate it My idea would be like this, but the par() function seem to be lower in hierarchy Thanks in advance # libra

[R] Kolmogorov distribution

2012-08-09 Thread densur
Please help me to get a function for Kolmogorov distribution. I've looked through the ks.test code and found that Kolmogorov distribution is calculating in the following way: pkstwo <- function(x, tol = 1e-06) { if (is.numeric(x)) x <- as.double(x) els

Re: [R] Add interpunct (dot) symbol to axis label?

2012-08-09 Thread Duncan Murdoch
On 12-08-08 9:21 PM, Hillary Ward wrote: I'm having problems creating an axis label for a plot. y_label = expression(paste(plain('CPUE '),plain('(fish'),plain('x'),plain('h'^{-1}),plain(')'))) I'd like to replace the "x" with an interpunct symbol (dot). Any suggestions how to do this? The int

Re: [R] How to draw clock in R ?

2012-08-09 Thread Jim Lemon
On 08/09/2012 08:58 PM, Manish Gupta wrote: Great! It works fine for me. But i have one query. In my clock i have only 10 points so i am using as follows. pie(c(25,20,15,10,10,30)) floating.pie(0,0,c(25,20,15,10,10,30)) pie.labels(0,0,seq(0,19*pi/10,by=pi/5),c(3,2,1,0,9,8,7,6,5,4)*10,radius=1.1,

Re: [R] help, please! matrix operations inside 3 nested loops

2012-08-09 Thread Petr PIKAL
Hi > thank you for your help. > > my input data looks like this (tab separated): > > Ind.nr. Pop.nr. scm266 rms1280 scm247 rms1107 > 1 101 305 318 222 135 > 1 101 305 318 231 135 > 2 101 305 313 999 96 > 2 101 305 321 999 130 > 3 101 305 32

Re: [R] How to find data in a map according to coordinates?

2012-08-09 Thread Rui Barradas
Hello, You have three coordinates but the problem description only envolves two of them, x and y. The code below is valid for any number of dimensions. min.dist <- function(p, coord){ which.min( colSums((t(coord) - p)^2) ) } # Use set.seed to have reproducible simulations set.seed(1) tes

Re: [R] help, please! matrix operations inside 3 nested loops

2012-08-09 Thread Petr PIKAL
Hi > all problems solved. thank you for your help! > for the sake of completeness, here my solution: > #1) read in data: > daten<-read.table('K:/Analysen/STRUCTURE/test.txt', header=TRUE, sep="\t") > daten<-as.data.frame(daten) not needed, daten is already data frame

Re: [R] basehaz() in package survival and warnings with coxph

2012-08-09 Thread Terry Therneau
I've never seen this, and have no idea how to reproduce it. For resloution you are going to have to give me a working example of the failure. Also, per the posting guide, what is your sessionInfo()? Terry Therneau On 08/09/2012 04:11 AM, r-help-requ...@r-project.org wrote: I have a couple of

Re: [R] Ctree plot

2012-08-09 Thread Weidong Gu
Hi, You may want to check grid.arrange in gridExtra package. Weidong On Thu, Aug 9, 2012 at 7:36 AM, rodrock wrote: > HI everybody! > > Has anybody figure out how would be possible to plot several ctree plots > beside each other? > I would really appreciate it > My idea would be like this, but

[R] How to interpret Poisson curve

2012-08-09 Thread Aziz, Muhammad Fayez
Hi All, My question is more academic than technical. The question is about interpretation of Poisson curve. I am using it to assess scale-free nature of degree distribution. Can you please briefly describe what is meant by the Poisson curve when you give it your range of k-neighbour data whic

Re: [R] Factor moderators in metafor

2012-08-09 Thread Viechtbauer Wolfgang (STAT)
There is a simple explanation: 1) The command: factor(ftype) does not actually turn 'ftype' permanently into a factor, since you are not re-assigning it back to the object 'ftype'. You have to use: ftype <- factor(ftype) 2) If you want to use the formula interface for specifying moderators, y

Re: [R] R versus SAS

2012-08-09 Thread John Kane
> -Original Message- > From: j...@bitwrit.com.au > Sent: Thu, 09 Aug 2012 19:55:29 +1000 > To: rolf.tur...@xtra.co.nz > Subject: Re: [R] R versus SAS > > On 08/09/2012 07:17 AM, Rolf Turner wrote: >> ... >> P. S. There is no such word as "recompensate". >> > Thanks to R, the internet and

Re: [R] Density

2012-08-09 Thread li li
Hi David, Thanks a lot for the reply. I might not have stated the problem clearly. Let me try again. Given a set of observations X, I want to find out the estimated density values for the observations X? I believe that the values "x" returned from "density" function is not the observat

[R] R Commander - Time Series

2012-08-09 Thread Billpete002
Hello all, I'm just starting to learn R and I heard a good way of doing that was R Commander. For my work I use a lot of time series, so I installed (and loaded) R Commander with epack. When I go to Ts-Models, after loading my data, I click on ARIMA Models tab. I load my variable D1 Ln Demand (1

Re: [R] read htm table error

2012-08-09 Thread arun
HI, I am using R 2.15 in Ubuntu 12.04.  It works fine for me. library(XML) theurl <- "http://en.wikipedia.org/wiki/Brazil_national_football_team"; tables <- readHTMLTable(theurl) A.K. - Original Message - From: "Lay, Kiung" To: "r-help@R-project.org" Cc: Sent: Thursday, August 9, 201

[R] Pseudo R2 in Quantile Regression

2012-08-09 Thread Vito Ricci
 Dear All, I'm starting to use the quantile regression, I would like to know if there is a way to calculate the fit of the model such as a pseudo R2. Many thanks. Best regards. Vito Ricci [[alternative HTML version deleted]] __ R-help@r-proj

Re: [R] reshape2's dcast() Adds NAs to Data Frame

2012-08-09 Thread Rich Shepard
On Wed, 8 Aug 2012, Jeff Newmiller wrote: I took a closer look, and unused factor levels is not the problem... the problem is defining id variables appropriately. Jeff, OK. 1) "sample" is the name of a builtin function, so it is not advisable to use it as the name of data. I have used "sa

Re: [R] read htm table error

2012-08-09 Thread John Kane
Works fine for me. sessionInfo() R version 2.15.1 (2012-06-22) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_CA.UTF-8LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_CA.UTF-8LC_MESSAGES=en_US.UTF-8 [7] LC_P

[R] All combinations possible in a mutliple regression

2012-08-09 Thread zel7223
Hi, I want to use four independent variables to predict the output of one dependent variable using a linear model lm. I want to compare all possible combinations of the 4 independent variables, including singles, pairs and triples. I was thinking of using the AIC test to compare all models and pi

Re: [R] Density

2012-08-09 Thread William Dunlap
You can use approx(d, xout=) (or spline()) on the output of density() to get density estimates at the points in xout. E.g., > X <- c(rnorm(20, -1, 1), rgamma(50,1/2)) > d <- density(X) > plot(d) > points(approx(d, xout=-2:2)) Or you could use the functions in package:logspline to fit

Re: [R] R Commander - Time Series

2012-08-09 Thread John Kane
I don't think a lot of people here use R Commander so diagnosing something from there may be difficult. Probably the first thing to do is to supply us with some sample data. The best way do do this is usually to use the dput() command and just copy and paste the output into your email . If

Re: [R] Factor moderators in metafor

2012-08-09 Thread John Hodgson
Thanks, I suspected it would be something simple. Best wishes John On 09/08/2012 14:42, Viechtbauer Wolfgang (STAT)-2 [via R] wrote: > There is a simple explanation: > > 1) The command: > > factor(ftype) > > does not actually turn 'ftype' permanently into a factor, since you > are not re-assign

Re: [R] Fill pattern for Boxplots?

2012-08-09 Thread John Kane
Probably not. See http://r.789695.n4.nabble.com/Boxplot-Fill-Pattern-td4457209.html on this topic. What exactly are you doing? There may be a workaround or alternative. John Kane Kingston ON Canada > -Original Message- > From: meyfa...@uni-potsdam.de > Sent: Wed, 8 Aug 2012 16:56:05 -

Re: [R] R Commander - Time Series

2012-08-09 Thread Michael Weylandt
On Aug 9, 2012, at 9:21 AM, John Kane wrote: > I don't think a lot of people here use R Commander so diagnosing something > from there may be difficult. > > Probably the first thing to do is to supply us with some sample data. The > best way do do this is usually to use the dput() comman

Re: [R] Parallel runs of an external executable with snow in local

2012-08-09 Thread Xavier Portell/UPC
Hi Uwe, I’ve tried changing the working directory and made a few tests and it seems it works perfectly fine. Thank you so much for your suggestion. I’ve found a minor issue running my code. Although I’m using: unlink(temporary.folder, recursive=TRUE) , it seems that many folders are not unlin

Re: [R] Density

2012-08-09 Thread David L Carlson
Sorry, between x and X I got confused about what you were trying to do. The quickest route is approx() or approxfun(): set.seed(42) X <- rnorm(100) den0 <- density(X, bw="SJ") XY <- approx(den0$x, den0$y, X) XY$y will differ slightly from your values (you could double the number of points in the

Re: [R] Add interpunct (dot) symbol to axis label?

2012-08-09 Thread Uwe Ligges
On 09.08.2012 13:56, Duncan Murdoch wrote: On 12-08-08 9:21 PM, Hillary Ward wrote: I'm having problems creating an axis label for a plot. y_label = expression(paste(plain('CPUE '),plain('(fish'),plain('x'),plain('h'^{-1}),plain(')'))) I'd like to replace the "x" with an interpunct symbol (d

Re: [R] R Commander - Time Series

2012-08-09 Thread John Fox
Dear Billpete002, This looks to me like it's possibly a bug in RcmdrPlugin.epack -- that is, you may have done something wrong, but I'd expect in this case that the timeseries plug=in would intercept the error and return an informative error message. You might want to correspond directly with the

Re: [R] R Commander - Time Series

2012-08-09 Thread John Kane
> Rather dput(head(my data, 50)) Argh!!! I think that in the third time in three weeks . John Kane Kingston ON Canada > -Original Message- > From: michael.weyla...@gmail.com > Sent: Thu, 9 Aug 2012 10:29:07 -0500 > To: jrkrid...@inbox.com > Subject: Re: [R] R Commander - Time Series >

[R] correlating rows of two differently-sized data frames in R

2012-08-09 Thread JenniferH
Hello everyone, I have two sets of data, with the following structure: DataSet1 Location PartSample 1 Sample 2 A 1 value value A 2 value value A 3 value value B

Re: [R] Changing labels positions in two graphics

2012-08-09 Thread gaiarrido
Sorry for the late answer. You both put me iin the correct way. Problem is solved - Mario Garrido Escudero PhD student Dpto. de Biología Animal, Ecología, Parasitología, Edafología y Qca. Agrícola Universidad de Salamanca -- View this message in context: http://r.789695.n4.nabble.com/Changi

Re: [R] mgcv and gamm4: REML, GCV, and AIC

2012-08-09 Thread Ben Bolker
john benson hotmail.com> writes: > I've been using gamm4 to build GAMMs for exploring environmental > influences on genetic ancestry. Things have gone well and I have 2 > very straightforward questions: 1. I've used method=REML. Am I > correct that this is an alternative method for estimating

Re: [R] Installing HDF5 package

2012-08-09 Thread Uwe Ligges
On 09.08.2012 10:18, sihemsaad wrote: As Uwe Ligges-3 guessed, i am working on a Windows Station. I also tried the link Uwe Ligges-3 posted and I think it worked Actually, my surname is "Ligges" rather than "Ligges-3". And you failed to cite the contents of the former part of the thread. P

[R] Remove axes in boplot

2012-08-09 Thread Filoche
Hi everyone. I'm trying to customize a biplot (RDA). I would like to remove all axes ticks. Therefore, I was using *ann=FALSE* (see following example). However, it only clear the axis 1 and 2 leaving ticks on axis 3 and 4. Any suggestions to get rdi of the remaining ticks? data(varespec) data(va

Re: [R] All combinations possible in a mutliple regression

2012-08-09 Thread Filoche
Try a look at this: http://stat.ethz.ch/R-manual/R-patched/library/MASS/html/stepAIC.html Regards, Phil -- View this message in context: http://r.789695.n4.nabble.com/All-combinations-possible-in-a-mutliple-regression-tp4639762p4639782.html Sent from the R help mailing list archive at Nabble.

Re: [R] Add interpunct (dot) symbol to axis label?

2012-08-09 Thread Duncan Murdoch
On 09/08/2012 11:52 AM, Uwe Ligges wrote: On 09.08.2012 13:56, Duncan Murdoch wrote: > On 12-08-08 9:21 PM, Hillary Ward wrote: >> I'm having problems creating an axis label for a plot. >> >> y_label = expression(paste(plain('CPUE >> '),plain('(fish'),plain('x'),plain('h'^{-1}),plain(')'))) >> >

[R] any recommendation for software about prediction analysis of gene expression data

2012-08-09 Thread Dai, Hongying,
Dear R users, I have a microRNA (similar to microarray) data set with gene expressions and group variables. I'd like to perform (class) prediction analysis to see which genes or gene sets predict the group variable well. I'm at the beginner level. Is there any free software in R or in point/cli

Re: [R] Add interpunct (dot) symbol to axis label?

2012-08-09 Thread Uwe Ligges
On 09.08.2012 18:05, Duncan Murdoch wrote: On 09/08/2012 11:52 AM, Uwe Ligges wrote: On 09.08.2012 13:56, Duncan Murdoch wrote: > On 12-08-08 9:21 PM, Hillary Ward wrote: >> I'm having problems creating an axis label for a plot. >> >> y_label = expression(paste(plain('CPUE >> '),plain('(fish'

Re: [R] any recommendation for software about prediction analysis of gene expression data

2012-08-09 Thread R. Michael Weylandt
I might suggest you move this question to the Bioconductor help list. (And look into bioconductor more generally) Best, Michael On Thu, Aug 9, 2012 at 10:26 AM, Dai, Hongying, wrote: > Dear R users, > > I have a microRNA (similar to microarray) data set with gene expressions and > group variabl

Re: [R] correlating rows of two differently-sized data frames in R

2012-08-09 Thread R. Michael Weylandt
Perhaps load them both and ?merge can show you the way. Michael On Thu, Aug 9, 2012 at 9:54 AM, JenniferH wrote: > Hello everyone, > > I have two sets of data, with the following structure: > > DataSet1 > Location PartSample 1 Sample 2 > A 1 value va

[R] RMySQL dbConnect issues

2012-08-09 Thread Anthony Dick
Hello, I have access to my database via command line and through workbench, and have access on the grant tables: mysql> SELECT host,user,password,select_priv,insert_priv FROM user; +--+---+---+-+-+ | host | user | passwor

Re: [R] Add interpunct (dot) symbol to axis label?

2012-08-09 Thread Hillary Ward
Thanks for the help - both solutions work fine. On Thu, Aug 9, 2012 at 9:20 AM, Uwe Ligges wrote: > > > On 09.08.2012 18:05, Duncan Murdoch wrote: > >> On 09/08/2012 11:52 AM, Uwe Ligges wrote: >> >>> >>> On 09.08.2012 13:56, Duncan Murdoch wrote: >>> > On 12-08-08 9:21 PM, Hillary Ward wrote: >>

Re: [R] Fill pattern for Boxplots?

2012-08-09 Thread Susanne Meyfarth
Thank you. I saw these postings, but I don't want to learn lattice for this reason (was afraid to have to change then everything else in my graph). Anyway, I now tried with different shades of greyscale (4 shades). I'm not fully satisfied with it, but it's ok. It's for a publication and dependi

Re: [R] read htm table error

2012-08-09 Thread Rui Barradas
Hello, Ditto, Windows 7. > library(XML) > theurl <- "http://en.wikipedia.org/wiki/Brazil_national_football_team"; > tables <- readHTMLTable(theurl) > > sessionInfo() R version 2.15.1 (2012-06-22) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=Portuguese_Portugal.1252 LC_CTYPE=Po

Re: [R] Fill pattern for Boxplots?

2012-08-09 Thread John Kane
You might want to have a look at RColorBrewer. If I remember correctly some of their palettes should work better than a standard R greyscale but I must admit I have not tried them. http://www.decisionstats.com/color-palettes-in-r-using-rcolorbrewer-rstats/ for a start. John Kane Kingston ON

Re: [R] correlating rows of two differently-sized data frames in R

2012-08-09 Thread R. Michael Weylandt
Hi Jen, It's generally best to keep cc'ing R-help so others can lend a hind when I step away from my computer: On Thu, Aug 9, 2012 at 11:49 AM, Jennifer Hobbs wrote: > Hi Michael - > > thanks for the advice - I did find merge() just after posting but I'm having > difficulty with using it. I've

Re: [R] Pass Conditional & loop argument into a function

2012-08-09 Thread David Winsemius
On Aug 8, 2012, at 2:16 PM, greatest.possible.newbie wrote: Ok I see that point with the quotes. But what I want to do still doesn't work: a <- matrix(1:15,ncol=3) b <- paste( paste("a[," ,paste(1:3), "]",sep="") ,"^",1:3,sep="",collapse="+") b #[1] "a[,1]^1+a[,2]^2+a[,3]^3" #instead of (wh

Re: [R] Question about R and multiple CPU's

2012-08-09 Thread R. Michael Weylandt
On Wed, Aug 8, 2012 at 6:18 PM, Eberle, Anthony wrote: > I have a question about multiple cores and CPU's for running R. I've > been running various tests on different types of hardware and operating > systems (64 bit, 32 bit, Solaris, Linux, Windows, RV.10, .12, .15, > .15.1.) Generally speakin

Re: [R] Fill pattern for Boxplots?

2012-08-09 Thread David L Carlson
It's not too hard to use rect() to add shading to the boxplots. The boxes are centered on consecutive integers and the width is +/- .4. The boxplot() function returns the quartiles of each box. set.seed(42) DF <- data.frame(val=rnorm(150), grp=rep(letters[1:6], 25)) outstat <- boxplot(val~grp, DF

Re: [R] R Commander - Time Series

2012-08-09 Thread David Winsemius
On Aug 9, 2012, at 8:55 AM, John Kane wrote: Rather dput(head(my data, 50)) There's an Internet name for the misspelling a correction of a spelling error. Something like Corollary. This is what I found, but it's not the name I (don't) remember: http://rationalwiki.org/wiki/Skitt%27s_

Re: [R] sapply and matrix command

2012-08-09 Thread R. Michael Weylandt
On Wed, Aug 8, 2012 at 10:37 AM, alijk1989 [via R] wrote: > > > Hi Michael, > > Thanks for your response. Here is a simple example of what I am trying to > do: > > w=rep(0.02,10) > Q=rep(0.02,10) > rho=matrix(0.5,nrow=10,ncol=10) > m=10 > LGD=0.45 > > M1=sum(sapply(1:m, > function(k){sum(sapply(1:

Re: [R] All combinations possible in a mutliple regression

2012-08-09 Thread arun
HI, I hope this helps you, set.seed(1)  dat1<-data.frame(X1=rnorm(25,15),X2=rnorm(25,5),X3=runif(25,0.4),X4=rnorm(25,12),Y=rnorm(25,35))  ColNam<-names(dat1)  ColNam #[1] "X1" "X2" "X3" "X4" "Y"  ColNam<-ColNam[!ColNam %in% "Y"]  n<-length(ColNam)  ColNam #[1] "X1" "X2" "X3" "X4"  id1<-unlist(

Re: [R] All combinations possible in a mutliple regression

2012-08-09 Thread arun
HI, I forgot about the AIC.  resAIC<-list() for(i in 1:length(res1)){  resAIC[[i]]<-list()  resAIC[[i]]<-AIC(res1[[i]])  }  unlist(resAIC) # [1] 71.25981 65.22991 71.32024 71.29489 67.20616 73.15101 73.13823 66.17742  #[9] 66.96219 73.27309 67.78183 68.85621 75.03196 68.00660 69.39852 A.K.

[R] Saving Data

2012-08-09 Thread Eric Kaufmann
I have a researcher who is running a large R job The job is currently on 3725 iterations. The total number of iterations is 27500. Is there a way to kill this and recover the data that has been generated thus far? Thanks, Eric -- Eric Kaufmann | Application Support Analyst - Advanced Technolo

[R] help hist some 'x' not counted; maybe 'breaks' do not span range of 'x'

2012-08-09 Thread aprendiz programa
Hello Guys, I would like help in script R when I try to plot the histogram appears the error: Erro em hist.default some 'x' not counted; maybe 'breaks' do not span range of 'x' I using a file with more 1000 datas (vector) hist(dados[[1]], seq(0, 20, 0.5), prob=TRUE, xlab="chuva (mm/dia)",

[R] Survey package: using subset option with svyrepdesign

2012-08-09 Thread BrentMast
Hi. I'm using American Housing Survey (AHS) data with replicate weights. I want subpopulation estimates. When I try to subset the survey design, I get an error message. I don't get the error message when not using the replicate weights (using the regular svydesign function). Any help would be ap

Re: [R] R Commander - Time Series

2012-08-09 Thread Prof Brian Ripley
On 09/08/2012 21:13, David Winsemius wrote: On Aug 9, 2012, at 8:55 AM, John Kane wrote: Rather dput(head(my data, 50)) There's an Internet name for the misspelling a correction of a spelling error. Something like Corollary. This is what I found, but it's not the name I (don't) remember:

Re: [R] help hist some 'x' not counted; maybe 'breaks' do not span range of 'x'

2012-08-09 Thread David L Carlson
Use summary(dados[[1]]). The error message is telling you that the data include values outside the 0 to 20 range you have specified. -- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 > -Origi

Re: [R] Add interpunct (dot) symbol to axis label?

2012-08-09 Thread David Winsemius
On Aug 8, 2012, at 6:21 PM, Hillary Ward wrote: I'm having problems creating an axis label for a plot. y_label = expression(paste(plain('CPUE '),plain('(fish'),plain('x'),plain('h'^{-1}),plain(')'))) I'd like to replace the "x" with an interpunct symbol (dot). Any suggestions how to do this?

Re: [R] Saving Data

2012-08-09 Thread Duncan Murdoch
On 12-08-09 3:41 PM, Eric Kaufmann wrote: I have a researcher who is running a large R job The job is currently on 3725 iterations. The total number of iterations is 27500. Is there a way to kill this and recover the data that has been generated thus far? Not likely, unless the process is writi

[R] indexing in data frames

2012-08-09 Thread jimi adams
I'm still not fully understanding exactly how R is handling data frames, but am getting closer. Any help with this one will likely go a long way in getting me there. Let's say I have a data frame, let's call it "a". Within that data frame i have two variables, let's call them "b" and "c", where

[R] POSIXct to ts

2012-08-09 Thread Mary Ann Middleton
Hi, I have a dataframe (try.1) with  date/time and temperature columns, and the date/time is in POSIXct fomat. Sample included below. I would like to to try decompose () or stl() to look at the trends and seasonality in my data, eventually so that  I can  look at autocorrelation.  The s

Re: [R] Setting Number of Displayed Digits

2012-08-09 Thread Steve Taylor
Have you tried: options(digits=9) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Rich Shepard Sent: Wednesday, 8 August 2012 5:51a To: r-help@r-project.org Subject: [R] Setting Number of Displayed Digits Some chemicals have co

[R] summary() after changing contrasts

2012-08-09 Thread Daniel Weitzenfeld
Hi, After running a regression on a factor variable, summary() reports the coefficients 'nicely,' ie, labelled with a string that is a concatenation of the variable name and the factor label. However, changing the base case a la contrasts(variable)<-contr.treatment(N, base=x) results in the coeff

Re: [R] indexing in data frames

2012-08-09 Thread David L Carlson
You have not defined a data frame since data frames cannot contain lists, but lists can contain data frames so you are asking about how to process a list. I'm changing your object names to a, b, and d because c() is the concatenation function and it can cause all kinds of problems to use it as an o

Re: [R] POSIXct to ts

2012-08-09 Thread R. Michael Weylandt
On Thu, Aug 9, 2012 at 3:30 PM, Mary Ann Middleton wrote: > > Hi, > > I have a dataframe (try.1) with date/time and temperature columns, and the > date/time is in POSIXct fomat. Sample included below. > > I would like to to try decompose () or stl() to look at the trends and > seasonality in my

[R] How to overlay a global map on a filled contour?

2012-08-09 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
I would like to plot some lat-lon data in a filled contour, and then overlay a map of the globe on top. I am trying something like this: filled.contour(lons, lats, glb.data, plot.axes={axis(1);axis(2);map(projection='rectangular',parameters=0,add =T)} ) The filled contour plots fine, and

Re: [R] indexing in data frames

2012-08-09 Thread David Winsemius
On Aug 9, 2012, at 2:43 PM, David L Carlson wrote: You have not defined a data frame since data frames cannot contain lists, Not true: > dput(a) structure(list(b = c(1988, 1989), c = list(c(1985, 1982, 1984), c(1988, 1980))), .Names = c("b", "c")) > a

Re: [R] How to overlay a global map on a filled contour?

2012-08-09 Thread Duncan Murdoch
On 12-08-09 6:14 PM, Cable, Sam B Civ USAF AFMC AFRL/RVBXI wrote: I would like to plot some lat-lon data in a filled contour, and then overlay a map of the globe on top. I am trying something like this: filled.contour(lons, lats, glb.data, plot.axes={axis(1);axis(2);map(projection='rectangular

Re: [R] indexing in data frames

2012-08-09 Thread David L Carlson
Amazing. You have to create the data frame and then add a variable containing the list to keep R from checking the number of rows and objecting: This does not work data.frame(b = c(1988, 1989),c = list(c(1985, 1982, 1984),c(1988, 1980))) Nor this data.frame(a$b, a$c) --- David > -Origin

[R] predict.drc for specific point

2012-08-09 Thread Joch
Does any one know how to calculate/predict the value at some time point (say 90%) based on dose response curve using "drc' in R? I know how to fit the curve with drc. But need to calculate 90% value at some time point. Many thanks. -- View this message in context: http://r.789695.n4.nabble.com

Re: [R] indexing in data frames

2012-08-09 Thread arun
HI, If  "b" is also an "element of list, then it would be much easier. b<-c(1988,1989,1990,1991,1992) c<-list(c(1985,1982,1984),c(1988,1980),c(1983,1984),c(1988,1998,1993),c(1993,1994,1998))  a<-list(b,c)  names(a)<-c("b","c")  lapply(1:length(a$c),function(x) a$b[x]-a$c[[x]]) [[1]] [1] 3 6 4 [[

Re: [R] indexing in data frames

2012-08-09 Thread arun
HI, You can get the results you wanted by: c=list(c(1985,1982,1984),c(1988,1980),c(1983,1984),c(1988,1998,1993),c(1993,1994,1998)) b1<-list(1988,1989,1990,1991,1992) for(i in 1:length(b1)){  anew[[i]]<-list()  anew[[i]]<-b1[[i]]-c[[i]]  }  anew [[1]] [1] 3 6 4 [[2]] [1] 1 9 --- --- But, i

Re: [R] How to overlay a global map on a filled contour?

2012-08-09 Thread Cable, Sam B Civ USAF AFMC AFRL/RVBXI
Duncan, I agree that my second code doesn't make sense. Sorry for the red herring. I was grasping at straws. My first code, however, differs from your suggestion only in that I am asking for a rectangular projection, AFAICT. As it turns out, I do get quite different results when asking for the

Re: [R] indexing in data frames

2012-08-09 Thread arun
HI, In the reply I sent, I forgot to add, anew<-list()#before, for(i in 1:length(b1)){  anew[[i]]<-list()  anew[[i]]<-b1[[i]]-c[[i]]  } A.K. - Original Message - From: jimi adams To: r-help@r-project.org Cc: Sent: Thursday, August 9, 2012 4:42 PM Subject: [R] indexing in data frames

  1   2   >