Re: [R] different between read.table and read.delim

2016-12-22 Thread David Winsemius
In the future you can examine the consequence kid various choices for parameters with something along the lines of table( count.fields( file= .. , ... )) Sent from my iPhone > On Dec 22, 2016, at 9:13 PM, Jinsong Zhao wrote: > >> On 2016/12/23 11:31, Sarah Goslee wrote: >>

Re: [R] different between read.table and read.delim

2016-12-22 Thread Jinsong Zhao
On 2016/12/23 11:31, Sarah Goslee wrote: Look at the default arguments to each, especially the quote argument. Sarah Thank you very much! The quote and fill argument are not same for the two function. only change quote or fill can not make read.table() work. Best, Jinsong On Thu, Dec

Re: [R] different between read.table and read.delim

2016-12-22 Thread Sarah Goslee
Look at the default arguments to each, especially the quote argument. Sarah On Thu, Dec 22, 2016 at 10:24 PM, Jinsong Zhao wrote: > Hi there, > > I have a data set file, called "ecotox.rep", which is a delimited file > separated with "|". > > When I tried to read the file with

[R] different between read.table and read.delim

2016-12-22 Thread Jinsong Zhao
Hi there, I have a data set file, called "ecotox.rep", which is a delimited file separated with "|". When I tried to read the file with the following command, > df <- read.table("ecotox.rep", sep = "|", header = TRUE, stringsAsFactors=FALSE) I got the error messages: Error in scan(file =

Re: [R] How to scale circle sizes in VennDiagram using draw.triple.venn

2016-12-22 Thread Ulrik Stervbo
Hi Yung-Chih, This works for me: library(Vennerable) data("StemCell") venn_res <- Venn(StemCell[1:3]) plot(venn_res, doWeights = TRUE) HTH Ulrik On Thu, 22 Dec 2016 at 20:54 Yung-Chih Lai wrote: > Hi Ulrik, > > It seems that VennDiagram cannot draw weighted diagrams.

Re: [R] How to scale circle sizes in VennDiagram using draw.triple.venn

2016-12-22 Thread Yung-Chih Lai
Hi Ulrik, It seems that VennDiagram cannot draw weighted diagrams. Many thanks for your information. Best, Gary On Fri, Dec 16, 2016 at 4:09 PM, Ulrik Stervbo wrote: > I usually use the package Vennerable for all my Venn needs. It also has > the option to draw

[R] gamlss question

2016-12-22 Thread George Trojan - NOAA Federal
What is the recommended way of accessing distribution parameters (mu, sigma, ...) from the model fit? The indention is to use those values in d/p/q/r calls. I came out with a wrapper gamlss_fit <- function(x, family) { fit <- gamlssML(x, family = family) mu <- fitted(fit, "mu")[1]

Re: [R] histogram first bar wrong position

2016-12-22 Thread Ted Harding
Willam has listed the lid on the essence of the problem, which is that in R the way that breaks (and therefore counts) in a histogram are evaluated is an area of long grass with lurking snakes! To get a glimpse of this, have a look at ?hist and in the seaction "Arguments", look at "breaks",

Re: [R] histogram first bar wrong position

2016-12-22 Thread William Dunlap via R-help
As a practical matter, 'continuous' data must be discretized, so if you have long vectors of it you will run into this problem. Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Dec 22, 2016 at 8:19 AM, Martin Maechler wrote: > > itpro >

Re: [R] histogram first bar wrong position

2016-12-22 Thread William Dunlap via R-help
Looking at the return value of hist will show you what is happening: > x <- rep(1:6,10*(6:1)) > z <- hist(x, freq=TRUE) > z $breaks [1] 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 $counts [1] 60 50 0 40 0 30 0 20 0 10 ... The the first bin is [1-1.5], including both endpoints, while the

Re: [R] "Patched " version listed on CRAN mirrors is actually Oct RC version

2016-12-22 Thread David Winsemius
> On Dec 22, 2016, at 5:25 AM, Watson, David W. (MSFC-ES62) > wrote: > > I downloaded the file > R-3.3-branch-mavericks-sa-x86_64.tar.gz > from http://r.research.att.com and

Re: [R] histogram first bar wrong position

2016-12-22 Thread Martin Maechler
> itpro > on Thu, 22 Dec 2016 16:17:28 +0300 writes: > Hi, everyone. > I stumbled upon weird histogram behaviour. > Consider this "dice emulator": > Step 1: Generate uniform random array x of size N. > Step 2: Multiply each item by six and

[R] histogram first bar wrong position

2016-12-22 Thread itpro
Hi, everyone. I stumbled upon weird histogram behaviour. Consider this "dice emulator": Step 1: Generate uniform random array x of size N. Step 2: Multiply each item by six and round to next bigger integer to get numbers 1 to 6. Step 3: Plot histogram. > x<-runif(N) > y<-ceiling(x*6) >

Re: [R] Any help on R code interpretation?

2016-12-22 Thread Rui Barradas
Hello, t() is the transpose function, it computes the transpose of matrix with(subset(data,site!='AB'),cbind(1, site=='BC', site =='MM', site =='XY',Temp,Treatment=='Local')) then %*% is matrix multiplication. If you have doubts on the result, compute as.matrix(mod7)%*%t(...) outside the call

Re: [R] "Patched " version listed on CRAN mirrors is actually Oct RC version

2016-12-22 Thread Erich Subscriptions
Current builds for R for Macs are available from http://r.research.att.com > On 22 Dec 2016, at 07:45, Berend Hasselman wrote: > > >> On 21 Dec 2016, at 14:23, Watson, David W. (MSFC-ES62) >> wrote: >> >> I have been trying to download the “patched”

Re: [R] "Patched " version listed on CRAN mirrors is actually Oct RC version

2016-12-22 Thread Watson, David W. (MSFC-ES62)
I downloaded the file R-3.3-branch-mavericks-sa-x86_64.tar.gz from http://r.research.att.com and unpacked it. What was downloaded was R version 3.3.2 RC (2016-10-26 r71594), not the advertised patched

Re: [R] Any help on R code interpretation?

2016-12-22 Thread Bert Gunter
?"%*%" ?t It looks like you need to spend some (more) time with an R tutorial or two to understand basic R syntax. Please do so before posting further here. There are many good ones on the web. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and

Re: [R] Reshape to wide format

2016-12-22 Thread Miluji Sb
Apologies for the late reply. Thank you very much! I get the following warnings. If I modify the code to add both month and year as part of the ID, will it still be correct? df$ID<-paste(df$iso3,df$lon,df$lat,df$year,df$month,sep="") wide <- reshape(df, v.names="precip", timevar="ID",

Re: [R] Any help on R code interpretation?

2016-12-22 Thread Ben Tupper
Hi, It's a bit hard to read what you have provided (don't forget that code pasted into emails on this list are best rendered if the email client is configured for plain text not html), but I suspect that it there is no %*%t. Instead, I think it should look like... x %*% t(y) where your x is

Re: [R] Any help on R code interpretation?

2016-12-22 Thread Thierry Onkelinx
Dear Marna, It's a combinations of two functions: %*% and t() help("%*%") and help("t") will open their helpfiles. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality

[R] Any help on R code interpretation?

2016-12-22 Thread Marna Wagley
HI R user, I was looking a r code and saw "%*%t", what does it("%*%t") mean?. The example is given below. For example: here is the code where "%*%t" has been used. when I run the formula but did not run in my data. prediction=plogis(as.matrix(mod7)%*%t(with(subset(data,site!='AB'),cbind(1,

[R] Tomas Kalibera joins the R core team

2016-12-22 Thread Martin Maechler
We are very happy to announce that Tomas Kalibera (e.g. https://github.com/kalibera ) has joined the R core team (on Dec 17). He has been a contributor to the R source with numerous improvements since mid 2014. Note that he's been among the five newly elected ordinary members of the R

Re: [R] creating possible cominations of a vector's elements

2016-12-22 Thread William Michels via R-help
Hi Dmitri, > hoyt <- unlist(strsplit("how are you today", split="\\s")) > y <- list() > for(j in seq_along(hoyt)) y[[j]] <- sapply(combn(length(hoyt), j, > simplify=F, function(i) hoyt[i]), paste, collapse = " ") > y [[1]] [1] "how" "are" "you" "today" [[2]] [1] "how are" "how you"

[R] [R-pkgs] gpuR 1.2.0 released

2016-12-22 Thread Charles Determan
Dear R users, I am happy to announce the most recent version of gpuR has been released. There are several new enhancements to the package including: 1.Automatically detect available SDK on install if available 2.Simplified installation to build OpenCL ICD when have OpenCL driver but

Re: [R] "Patched " version listed on CRAN mirrors is actually Oct RC version

2016-12-22 Thread David Winsemius
> On Dec 21, 2016, at 10:45 PM, Berend Hasselman wrote: > > >> On 21 Dec 2016, at 14:23, Watson, David W. (MSFC-ES62) >> wrote: >> >> I have been trying to download the “patched” version of 3.3.2 for Mac from >> CRAN, but the version that gets