Re: [R] problem installing R 2.5

2016-11-07 Thread Göran Broström
libX11-dev? Göran On 2016-11-07 19:27, Lentes, Bernd via R-help wrote: Hi, i'd like to install R 2.5 on an Ubuntu 14.04. I have a special software requiring this old version. While ./configure, i get the following error: checking for mbstate_t... yes checking for X... no configure: error: --

Re: [R] a book recommendation, please [O/T]

2016-11-07 Thread Erin Hodgess
I like BH^2 as well as a reference book! I actually think I will go with the DOE with R by Larson. Thanks to all for the help! Sincerely, Erin On Mon, Nov 7, 2016 at 10:59 PM, Bert Gunter wrote: > Have you looked here: > > https://www.amazon.com/s/ref=sr_pg_2?rh=n%3A283155%2Ck% > 3Aexperimen

Re: [R] a book recommendation, please [O/T]

2016-11-07 Thread Bert Gunter
Have you looked here: https://www.amazon.com/s/ref=sr_pg_2?rh=n%3A283155%2Ck%3Aexperimental+design&page=2&keywords=experimental+design&ie=UTF8&qid=1478580868 I would think your choice depends strongly on the arena of application. Of course I like BH^2, but that was because I was taught by them.

[R] a book recommendation, please [O/T]

2016-11-07 Thread Erin Hodgess
Hello! Could someone recommend a good book on Design of Experiments for a Master's in Data Analytics, please? I use Montgomery's book for my undergrad course, but was thinking about something a little more advanced for this one. Any help much appreciated, particularly with R-related texts. Sinc

Re: [R] Help with decrypting

2016-11-07 Thread Bob Rudis
Perhaps https://cran.r-project.org/web/packages/bcrypt/index.html might be of assistance. If not, drop a note back to the list as it'll be trivial to expand on that to give you an R alternative to Perl. On Mon, Nov 7, 2016 at 5:47 PM, MacQueen, Don wrote: > I have a file containing encrypted con

Re: [R] Help with decrypting

2016-11-07 Thread Marc Schwartz
> On Nov 7, 2016, at 4:47 PM, MacQueen, Don wrote: > > I have a file containing encrypted contents. The contents can be decrypted > using perl, like this: > > open (FILEHANDLE, "/path/to/file") > chomp ($ciphertext = ); > > > use Crypt::CBC; > $cipher = Crypt::CBC->new( -key=> 'my secret

[R] Help with decrypting

2016-11-07 Thread MacQueen, Don
I have a file containing encrypted contents. The contents can be decrypted using perl, like this: open (FILEHANDLE, "/path/to/file") chomp ($ciphertext = ); use Crypt::CBC; $cipher = Crypt::CBC->new( -key=> 'my secret key', -cipher => 'Blowfish'

Re: [R] about data structure

2016-11-07 Thread Jeff Newmiller
You have non-numeric data somewhere in that column, and factor is already a numeric type (Read about factors in the Introduction to R document that comes with R). Try DF$prec_new = as.numeric(as.character (DF$precip) and then look at DF$precip[ is.na( DF$precip_new ) ] to see which values ar

Re: [R] Euler & Runge-Kutta

2016-11-07 Thread Thomas Petzoldt
Am 07.11.2016 um 21:52 schrieb Franklin Bretschneider: Hello Tom Mosca, Re: Can someone help me with R code to perform approximations to second order differential equations and systems of first order differential equations using Euler's method and Runge-Kutta? I am not a student and this is

Re: [R] Euler & Runge-Kutta

2016-11-07 Thread Franklin Bretschneider
Hello Tom Mosca, Re: > Can someone help me with R code to perform approximations to second order > differential equations and systems of first order differential equations > using Euler's method and Runge-Kutta? I am not a student and this is not for > a test or graded assignment. > > Exampl

Re: [R] about data structure

2016-11-07 Thread Rui Barradas
Hello, Try as.numeric(as.character(DF$precip)) Hope this helps, Rui Barradas Em 07-11-2016 20:24, lily li escreveu: Hi R users, I'm wondering why the values changed when I try to transform factors into numerics. For example, for a data frame DF, there is one column called precipitation, wh

[R] about data structure

2016-11-07 Thread lily li
Hi R users, I'm wondering why the values changed when I try to transform factors into numerics. For example, for a data frame DF, there is one column called precipitation, which is usually lower than 100mm. But this column is factor when I read in the data. When transform to numeric values, some

Re: [R] Dealing with -Inf in a maximisation problem.

2016-11-07 Thread William Dunlap via R-help
Using log1p instead of log improves the accuracy of the 'subtract xmax' algorithm when the largest x is very close to zero. Perhaps that is what is missing in the Rf_logspace_add. test <- function (x) { x <- as.numeric(x) i <- which.max(x) rbind(Rmpfr = as.numeric(log(sum(exp(Rmpfr::m

Re: [R] Three-component Negative Binomial Mixture: R code

2016-11-07 Thread Achim Zeileis
On Mon, 7 Nov 2016, danilo.car...@uniparthenope.it wrote: I need a function for R software which computes a mixture of Negative Binomial distributions with at least three components. The package "countreg" on R-Forge provides a driver FLXMRnegbin() that can be combined with the "flexmix" pack

Re: [R] Euler & Runge-Kutta

2016-11-07 Thread Jeff Newmiller
Google is your friend "R Runge kutta" [1][2] This actually is not the "do my research for me" list... when you have a specific problem with R, this is a good place to get help by providing a reproducible example. You are expected to have some reasonable familiarity with the theory underlying th

Re: [R] Dealing with -Inf in a maximisation problem.

2016-11-07 Thread William Dunlap via R-help
It would be nice if the C functions Rf_logspace_sum, Rf_logspace_add, and Rf_logspace_sub were available as R functions. (I wish the '_sub' were '_subtract' because 'sub' means too many things in R.) I think Rf_logspace_sum in R could be a little better. E.g., using the C code #include #include

Re: [R] Euler & Runge-Kutta

2016-11-07 Thread Ismail SEZEN
> On 07 Nov 2016, at 19:26, Tom Mosca wrote: > > Can someone help me with R code to perform approximations to second order > differential equations and systems of first order differential equations > using Euler's method and Runge-Kutta? I am not a student and this is not for > a test or gra

[R] problem installing R 2.5

2016-11-07 Thread Lentes, Bernd via R-help
Hi, i'd like to install R 2.5 on an Ubuntu 14.04. I have a special software requiring this old version. While ./configure, i get the following error: checking for mbstate_t... yes checking for X... no configure: error: --with-x=yes (default) and X11 headers/libs are not available The problem is

[R] Euler & Runge-Kutta

2016-11-07 Thread Tom Mosca
Can someone help me with R code to perform approximations to second order differential equations and systems of first order differential equations using Euler's method and Runge-Kutta? I am not a student and this is not for a test or graded assignment. Examples (unrelated to each other): h =

Re: [R] Three-component Negative Binomial Mixture: R code

2016-11-07 Thread Bert Gunter
Opinion only (and therefore ignorable): Unless you have a lot (?) of data, fitting such a model successfully is likely to be very challenging. I suggest that you consult a local statistical expert to see if you might take a different approach. On Mon, Nov 7, 2016 at 4:42 AM, wrote: > I need a

Re: [R] Kosaraju's SCC Algorithm Running

2016-11-07 Thread Bert Gunter
See here -- found by googling "recursion limits in R" http://stackoverflow.com/questions/26797537/r-programming-level-of-allowed-recursion-depth-differs-when-calling-a-local-hel -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it

Re: [R] Problem with downloading library(Rcmdr)

2016-11-07 Thread varin sacha
David, Jeff, Many thanks, I have installed an older version of R and rmle packages works. Best De : David Winsemius À : Jeff Newmiller oject.org> Envoyé le : Dimanche 6 novembre 2016 16h35 Objet : Re: [R] Problem with downloading library(Rcmdr) > On

[R] Three-component Negative Binomial Mixture: R code

2016-11-07 Thread danilo . carita
I need a function for R software which computes a mixture of Negative Binomial distributions with at least three components. I found on another site the following function "mixnbinom". It works very well, but it computes a mixture of only two components: mixnbinom=function(y,k1,mu1,k2,mu2,prob

Re: [R] Kosaraju's SCC Algorithm Running

2016-11-07 Thread Jie C
Hi Jeff, Thanks for your reply! We are definitely not seeking for help with the assignment per se. Maybe we should have given you a simpler code to just illustrate the problem. We found this to be an interesting case for illustrating the recursion limit of R. For other languages such as Python, Ja

Re: [R] Dealing with -Inf in a maximisation problem.

2016-11-07 Thread Paul Gilbert
I am trying to deal with a maximisation problem in which it is possible for the objective function to (quite legitimately) return the value -Inf, (Just to add to the pedantic part of the discuss by those of us that do not qualify as younger and wiser:) Setting log(0) to -Inf is often conveni

Re: [R] Dealing with -Inf in a maximisation problem.

2016-11-07 Thread Martin Maechler
> William Dunlap via R-help > on Sun, 6 Nov 2016 20:53:17 -0800 writes: > Perhaps the C function Rf_logspace_sum(double *x, int n) would help in > computing log(b). It computes log(sum(exp(x_i))) for i in 1..n, avoiding > unnecessary under- and overflow. Indeed! I had t

Re: [R] Rmpfr into data.frame

2016-11-07 Thread Martin Maechler
> Troels Ring > on Mon, 7 Nov 2016 10:09:02 +0100 writes: > Dear friends - Windows, R version 3.2.1 > I wanted to make a ggplot2 using Rmpfr high precision data - but cannot > make the data into a data.frame, as wanted by ggplot2. Hence > library(Rmpfr) > a <- mp

[R] Rmpfr into data.frame

2016-11-07 Thread Troels Ring
Dear friends - Windows, R version 3.2.1 I wanted to make a ggplot2 using Rmpfr high precision data - but cannot make the data into a data.frame, as wanted by ggplot2. Hence library(Rmpfr) a <- mpfr(1,120) b <- mpfr(2,120) dff <- data.frame(a=a,b=b) elicits errors Error in as.data.frame.defau