Re: [R] How to access https page

2015-03-09 Thread Prof Brian Ripley
On 09/03/2015 22:39, Hui Du wrote: Hi All, I am trying to parse some information from website, say, a linkedin page. The linkedin url was url = "http://www.linkedin.com/in/huidu"; I had no problem to use readLines and XML package to collect the information I need. However, that url became " ht

Re: [R] Alpha not working in geom_rect

2015-03-09 Thread Jeff Newmiller
I have run into this a couple of times ... If you generate the rectangles once per row of your data, the fill gets more and more "dense" so your alpha seems to not work. The annotate call only paints the rectangle once so you don't have this problem. -

Re: [R] Change the argument function inside R function in GPfit package

2015-03-09 Thread C W
I guess I should re-frame my question with real data. > xx [,1] [1,] 0.0 [2,] 0.2 [3,] 0.4 [4,] 0.6 [5,] 0.8 > yy [,1] [1,] 0.000 [2,] 0.1652000 [3,] 0.4343223 [4,] 0.5996505 [5,] 0.7195857 > cor.mat [,1] [,2] [,3] [,4][,5] [1,] 1.00

[R] How to access https page

2015-03-09 Thread Hui Du
Hi All, I am trying to parse some information from website, say, a linkedin page. The linkedin url was url = "http://www.linkedin.com/in/huidu"; I had no problem to use readLines and XML package to collect the information I need. However, that url became " https://www.linkedin.com/in/huidu"; now

Re: [R] APE

2015-03-09 Thread Simon Blomberg
It's hard to tell what you did exactly. Did you do: mytree <- compute.brlen(mytree) ? That should have worked. I've cc'ed this message to r-sig-phylo, which is the more appropriate forum. Cheers, Simon. On 10/03/15 07:05, Beth Williams wrote: Dear All, I am having some trouble with R and

Re: [R] How to access https page

2015-03-09 Thread Jorge I Velez
Hi Hui, I have used the source_url function in the devtools package with good results. Give it a shot! Best, Jorge.- On Tue, Mar 10, 2015 at 9:39 AM, Hui Du wrote: > Hi All, > > I am trying to parse some information from website, say, a linkedin page. > The linkedin url was > > url = "http:/

[R] svg2swf - controlling the looping of flash files

2015-03-09 Thread Paul Sweeting
Hi I'm using svg2swf to collate a number of svg outputs into an swf file. I've got this working (mainly.) except that I can't control the looping behaviour of the swf file. In other words, when it's loaded into html it loops continuously. Is there any way to stop the animation looping, so it

[R] R can't find tcl-tk

2015-03-09 Thread Imran Akbar
Hi, I've installed the latest version of R from source on Amazon Linux with the following config flags: ./configure --with-tcl-config=/opt/ActiveTcl-8.6/lib/tclConfig.sh --with-tk-config=/opt/ActiveTcl-8.6/lib/tkConfig.sh After running make and make install, I try to run R and install the 'anesra

Re: [R] question about the geometric distribution, please

2015-03-09 Thread Huang, JS
Maybe you are looking for rnbinom? JS Huang 636.536.5635 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Erin Hodgess Sent: Monday, March 09, 2015 3:52 PM To: R help Subject: [R] question about the geometric distribution, please Hello! The function rg

Re: [R] Alpha not working in geom_rect

2015-03-09 Thread adel daoud
Hi Jim, Thanks for the input but that did not work. I am suing Rstudio by the way and I guess that has a better device that would support ggplot output. The annotate options works but that does not explain why the geom_area does not work: annotate("rect", xmin=2, xmax=10, ymin=0, ymax=1, fill="b

[R] APE

2015-03-09 Thread Beth Williams
Dear All, I am having some trouble with R and would be extremely grateful if anyone has a way around this. I have loaded a nexus tree from PAUP into R using the command read.nexus and this loaded, it was reported as "rooted; with no branch lengths". I then used the command "compute.brlen(mytr

Re: [R] question about the geometric distribution, please

2015-03-09 Thread David Winsemius
On Mar 9, 2015, at 1:52 PM, Erin Hodgess wrote: > Hello! > > The function rgeom is based on the geometric distribution such that x = 0, > 1, > > Is there a function which produces the geometric results such that x = 1, > 2, ... > please? > > Thought I'd check before I started coding. Thi

[R] increase max. console output lines

2015-03-09 Thread Thomas
Hi, I have a lengthy R script, which just got a bit too long for the console output to cache all executions history, i.e. when scrolling to the top the first few commands executed are not listed any more. What is the current limit (characters? lines?) and how do I increase it? R is 2.14, Win7

[R] Revolutions blog: February roundup

2015-03-09 Thread David Smith
For more than 6 years, Revolution Analytics staff and guests have written about R every weekday at the Revolutions blog: http://blog.revolutionanalytics.com and every month I post a summary of articles from the previous month of particular interest to readers of r-help. In case you missed them, h

Re: [R] calculate value in dependence of target value

2015-03-09 Thread David L Carlson
This works for your example data, but I'd recommend testing it carefully before using it. > dat <- data.frame(ID=11:14, VALUE=c(1, 5, 3, 2)*1) > HURD <- c(50, 75, 100)*1000 > PCT <- c(.02, .04, .08, .1) > dat$CVALUE <- cumsum(dat$VALUE) > dat$LVALUE <- dat$CVALUE - dat$VALUE > dat ID VALUE

[R] question about the geometric distribution, please

2015-03-09 Thread Erin Hodgess
Hello! The function rgeom is based on the geometric distribution such that x = 0, 1, Is there a function which produces the geometric results such that x = 1, 2, ... please? Thought I'd check before I started coding. Thank you! Sincerely, Erin -- Erin Hodgess Associate Professor Depart

Re: [R] calculate value in dependence of target value

2015-03-09 Thread Jeff Newmiller
target <- 10 breakpts <- data.frame( PctTarget=c(50,75,100,Inf), Mult=c(2,4,8,10) ) breakpts$LastPct <- c( 0, breakpts$PctTarget[ -nrow( breakpts ) ] ) breakpts$Range <- cut( breakpts$PctTarget, c( 0, breakpts$PctTarget ), include.lowest=TRUE ) breakpts$DeltaPct <- with( breakpts, diff(

Re: [R] SPSS command "match files" for merging one-to-many (hierarchical) equivalent in R?

2015-03-09 Thread Marc Schwartz
> On Mar 9, 2015, at 1:53 PM, Duncan Murdoch wrote: > > On 09/03/2015 1:40 PM, Kristina Loderer wrote: >> Dear R community, >> >> to combine data sets of hierarchical, nested nature (i.e., data sets >> linked by, for example, the variable "study ID" and then also by >> "outcome_variable_1" and

Re: [R] SPSS command "match files" for merging one-to-many (hierarchical) equivalent in R?

2015-03-09 Thread Duncan Murdoch
On 09/03/2015 1:40 PM, Kristina Loderer wrote: Dear R community, to combine data sets of hierarchical, nested nature (i.e., data sets linked by, for example, the variable "study ID" and then also by "outcome_variable_1" and "outcome_variable_2") I can use the match files command in SPSS. What is

Re: [R] Help with optim() to maximize log-likelihood

2015-03-09 Thread Sophia Kyriakou
yes Ben, this works indeed! Thanks a million!! On Mon, Mar 9, 2015 at 7:17 PM, Ben Bolker wrote: > Sophia Kyriakou gmail.com> writes: > > > > > hello, I am using the optim function to maximize the log likelihood of a > > generalized linear mixed model and I am trying to replicate glmer's > > es

[R] Fitting fevd fuction to list R

2015-03-09 Thread Zilefac Elvis
I have data for 90 climate stations. For each station, I have made 100+ simulations using a statistical model. So, in R, I have 90 dataframes, each dataframe has 100+ simulations arranged column-wise. Now, I would like to fit an extreme value distribution (EVD) to each climate station. That is

[R] SPSS command "match files" for merging one-to-many (hierarchical) equivalent in R?

2015-03-09 Thread Kristina Loderer
Dear R community, to combine data sets of hierarchical, nested nature (i.e., data sets linked by, for example, the variable "study ID" and then also by "outcome_variable_1" and "outcome_variable_2") I can use the match files command in SPSS. What is the equivalent command / function in R? Is it th

[R] Change the argument function inside R function in GPfit package

2015-03-09 Thread C W
Hi R list, I am using the GPfit package to fit Gaussian Process model. The kernel in the package is, K(x, x') = sigma^2 * exp(x-x')^2 My kernel have an extra term, K((x, z), (x', z')) = sigma^2 * exp(x-x')^2 * exp(z-z')^2 The function corr_matrix() is, corr_matrix(X, beta, corr=list(type="expon

Re: [R] R/3.1.3 source installation

2015-03-09 Thread Prof Brian Ripley
This is the wrong list: see the posting guide. As it is about compiled code, R-help is quite inappropriate, and as it is Mac-specific, post to R-sig-mac. The issue appears to be that you did not follow the R-admin manual and used the wrong Fortran compiler: gfortran-4.2.3 is documented for M

[R] R/3.1.3 source installation

2015-03-09 Thread White Sky
R 3.1.3 is available for installation via source-code. However ./configure terminates with checking for dummy main to link with Fortran 77 libraries... none checking for Fortran 77 name-mangling scheme... unknown configure: WARNING: unknown Fortran name-mangling scheme checking whether gfor

Re: [R] plotting the one-dimensional density of events in time

2015-03-09 Thread Christopher W. Ryan
Tom and Bill-- Thanks! Both excellent solutions. --Chris Christopher W. Ryan, MD, MS cryanatbinghamtondotedu Early success is a terrible teacher. You’re essentially being rewarded for a lack of preparation, so when you find yourself in a situation where you must prepare, you can’t do it. You do

Re: [R] Help with optim() to maximize log-likelihood

2015-03-09 Thread Ben Bolker
Sophia Kyriakou gmail.com> writes: > > hello, I am using the optim function to maximize the log likelihood of a > generalized linear mixed model and I am trying to replicate glmer's > estimated components. If I set both the sample and subject size to q=m=100 > I replicate glmer's results for the

[R] Book: Beginner's Guide to Data Exploration and Visualisation with R.

2015-03-09 Thread Highland Statistics Ltd
We are please to announce the following book: Title: Beginner's Guide to Data Exploration and Visualisation with R. Authors: Ieno & Zuur Book website: http://www.highstat.com/BGDEV.htm Paperback or EBook can be order (exclusively) from: http://www.highstat.com/bookorder.htm TOC: http://www.h

Re: [R] calculate value in dependence of target value

2015-03-09 Thread David L Carlson
It is very hard to figure out what you are trying to do. 1. All of the VALUEs are greater than the target of 100 2. Your description of what you want does not match your example. Perhaps VALUE should be divided by 1000 (e.g. not 1, but 10)? Perhaps your targets do not apply to VALUE, but to

Re: [R] Add sum line to plot of multiple x values

2015-03-09 Thread Loris Bennett
PIKAL Petr writes: > Hi > > Not extremely clear what do you want to plot. Do you want to add a > line which marks total number of files each day regardless of user? Or > a total number of files regardless of date coloured by user? Sorry, I was unclear. I meant that I would like to plot the foll

Re: [R] calculate value in dependence of target value

2015-03-09 Thread Matthias Weber
Hi David, thanks for the reply. My spelling of the numbers was not correct. What I mean with 100.000 is 10.00 ! I have corrected the values in my example below me. Maybe you can understand it better now. Crucially is, that the "MARGE" rises up in dependence of the ID. The ID 11 will be cou

[R] Help with optim() to maximize log-likelihood

2015-03-09 Thread Sophia Kyriakou
hello, I am using the optim function to maximize the log likelihood of a generalized linear mixed model and I am trying to replicate glmer's estimated components. If I set both the sample and subject size to q=m=100 I replicate glmer's results for the random intercept model with parameters beta=-1

Re: [R] Extract year from date

2015-03-09 Thread MacQueen, Don
You need to solve step 1 (converting to Date class) before you can solve step 2 (getting the year as a number). In the data you are starting with, the first value in the Date column is 41163. You don't say whether that column is numeric or character, so let's try it both ways: > as.Date('41163','

Re: [R] Add sum line to plot of multiple x values

2015-03-09 Thread PIKAL Petr
Hi Not extremely clear what do you want to plot. Do you want to add a line which marks total number of files each day regardless of user? Or a total number of files regardless of date coloured by user? In each case you shall search functions geom_hline or geom_abline http://stackoverflow.com/q

[R] Add sum line to plot of multiple x values

2015-03-09 Thread Loris Bennett
Hi, Here are my data: > d user files date 1 alice18 2013-09-15 2 bob 5 2013-09-15 3 carol21 2013-09-15 4 alice22 2013-09-08 5 bob 9 2013-09-08 6 carol14 2013-09-08 7 alice26 2013-09-01 8 bob 3 2013-09-01 9 carol22 2013-09-01 I would like to plot

[R] calculate value in dependence of target value

2015-03-09 Thread Matthias Weber
Hello together, i have a litte problem. Maybe anyone can help me. I have to calculate a new column in dependence of a target value. As a example: My target value is 100.000 At the moment I have a data.frame with the following values. IDVALUE 1 111 2 125 3 1330

Re: [R] R: Reverse Complementary Base Problem

2015-03-09 Thread Boris Steipe
Use reverseComplement() in the Biostrings package. B. On Mar 8, 2015, at 10:08 PM, saran wai wrote: > Hi I'm new to R programming and trying to write program for Reverse and > Complementary Base. the objective is to Design A DNA primer. So I have a DNA > sequence with base A T C G and A compl

Re: [R] Rstudio R-devel libR.so

2015-03-09 Thread Jeff Newmiller
Please read the Posting Guide. Unreleased versions of R are off-topic in this mailing list (see the R-devel mailing list). RStudio-specific questions are also off-topic here (should be about R, not IDEs). --- Jeff Newmiller

[R] R: Reverse Complementary Base Problem

2015-03-09 Thread saran wai
Hi I'm new to R programming and trying to write program for Reverse and Complementary Base. the objective is to Design A DNA primer. So I have a DNA sequence with base A T C G and A complement to T; T=A;C=G;G=C. I just figure out How to Reverse It Already. but for the Complement i can only make

[R] Show all elements

2015-03-09 Thread Leandro Marino
Hi, Look to the following code: set.seed(1) dados = data.frame(valor=rnorm(100),var=sample(LETTERS[c(1,2,3,5)],100,replace=T),peso=rpois(100,2)) dados[1:10,] dados$var <- factor(dados$var,levels=LETTERS[1:5]) table(dados$var) A B C D E 31 31 19 0 19 When I try to use summarize, Hmisc packa

Re: [R] "survMisc" package

2015-03-09 Thread Andrews, Chris
The package maintainer may be able to give help. However, I don't get the same output as you (3.1.2). Perhaps you can update and solve your problem. > require(survMisc) Loading required package: survMisc Loading required package: survival Loading required package: splines Loading required packa

Re: [R] Rstudio R-devel libR.so

2015-03-09 Thread Karim Mezhoud
Thanks Pascal. Not yet resolved. Here is an example of symbolic link between libR.so https://support.rstudio.com/hc/communities/public/questions/200661703-R-shared-library-usr-local-lib-R-lib-libR-so-not-found-UBUNTU-11- When I get a symbolic link with: sudo ln -s /usr/lib/R/lib/libR.so /usr/lo

Re: [R] Rstudio R-devel libR.so

2015-03-09 Thread Pascal Oettli
Hello, There is a dedicated support to RStudio here: https://support.rstudio.com Regards, Pascal On Mon, Mar 9, 2015 at 7:41 PM, Karim Mezhoud wrote: > Dear All, > I am actually on R-devel using shell consol. When I run RStudio, it can't > find libR.so in the new /lib folder where is libRblas.s

[R] Rstudio R-devel libR.so

2015-03-09 Thread Karim Mezhoud
Dear All, I am actually on R-devel using shell consol. When I run RStudio, it can't find libR.so in the new /lib folder where is libRblas.so libRlapack.so. At first step I configure R-devel to share library with ./configure --enable-R-shlib. when I copied libR.so from /usr/lib/R/lib/libR.so (sta

Re: [R] problem with function that adds rows to dataframe based on conditional statement

2015-03-09 Thread PIKAL Petr
Hi As you do not accept solution with adding so many NA rows for those you do not have repetitions I think that merge together with some preparation is the way to go. First of all do not use cbind when constructing data frame comAn=data.frame(animals,animalYears,animalMass) # indicator variab

[R] R 3.1.3 is released

2015-03-09 Thread Peter Dalgaard
The build system rolled up R-3.1.3.tar.gz (codename "Smooth Sidewalk") this morning. The list below details the changes in this release. You can get the source code from http://cran.r-project.org/src/base/R-3/R-3.1.3.tar.gz or wait for it to be mirrored at a CRAN site nearer to you. Binaries