[R] trying to find the multiple combinations...

2017-12-07 Thread Benjamin Sabatini
Hi, I'm trying to find a way to determine what multiples of the combination of three or more numbers equals a forth number. So, if I had a number set like: c(13.4689, 12.85212, 17.05071) What combination and multiples of these numbers would average to 15.0078? (so, something that would tell m

Re: [R] Curiously short cycles in iterated permutations with the same seed

2017-12-07 Thread Eric Berger
Hi Boris, Do a search on "the order of elements of the symmetric group". (This search will also turn up homework questions and solutions.) You will understand why you are seeing this once you understand how a permutation is decomposed into cycles and how the order relates to a partition of n (n=10

Re: [R] parallel computing with foreach()

2017-12-07 Thread Kumar Mainali
Thanks Peter. I failed to realize earlier that one of the functions I used came from a package. The following solved the problem. foreach(i = 1:length(splist)) %:% foreach(j = 1:length(covset), .packages = c("raster")) %dopar% { ... On Thu, Dec 7, 2017 at 1:52 AM, Peter Langfelder wrote:

[R] Curiously short cycles in iterated permutations with the same seed

2017-12-07 Thread Boris Steipe
I have noticed that when I iterate permutations of short vectors with the same seed, the cycle lengths are much shorter than I would expect by chance. For example: X <- 1:10 Xorig <- X start <- 112358 N <- 10 for (i in 1:N) { seed <- start + i for (j in 1:1000) { # Maximum cycle length to c

Re: [R] Preventing repeated package installation, or pre installing packages

2017-12-07 Thread Larry Martell
On Wed, Nov 29, 2017 at 11:20 AM, Thierry Onkelinx wrote: > Dear Larry, > > Have a look at https://github.com/inbo/rstable That is a dockerfile > with a stable version of R and a set of packages. Thank you very much. This is very useful to me. > 2017-11-29 15:28 GMT+01:00 Larry Martell : >> I ha

Re: [R] Preventing repeated package installation, or pre installing packages

2017-12-07 Thread Larry Martell
On Wed, Nov 29, 2017 at 11:14 AM, Rainer Krug wrote: > > > On 29 Nov 2017, at 15:28, Larry Martell wrote: > > I have a R script that I call from python using rpy2. It uses dplyr, doBy, > and ggplot2. The script has install.packages commands for these 3 packages. > Even thought the packages are al

Re: [R] Seeking help with code

2017-12-07 Thread David Winsemius
> On Dec 7, 2017, at 2:51 PM, Stephanie Tsalwa wrote: > > Assuming the days of raining during half a year of all states(provinces) of a > country is normally distributed (mean=�, standard deviation=�) with sigma (�) > equals to 2. We now have 10 data points here: 26.64, 30.65, 31.27, 33.04, >

[R] Revolutions blog: November 2017 roundup

2017-12-07 Thread David Smith (CLOUD AI) via R-help
Since 2008, Microsoft (formerly Revolution Analytics) staff and guests have written about R 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, here

Re: [R] Error in loadNamespace

2017-12-07 Thread James Henson
Thanks David!, that fixed the problem. Best regards, James On Thu, Dec 7, 2017 at 1:19 PM, David Winsemius wrote: > > > On Dec 7, 2017, at 10:47 AM, James Henson wrote: > > > > Hello R Community, > > > > I inadvertently updated packages via R Studio when a package was open. > Now > > when R Stu

Re: [R] Error in loadNamespace

2017-12-07 Thread David Winsemius
> On Dec 7, 2017, at 10:47 AM, James Henson wrote: > > Hello R Community, > > I inadvertently updated packages via R Studio when a package was open. Now > when R Studio is opened the message below appears in the console panel. > > Error in loadNamespace(name) : there is no package called ‘yam

[R] Error in loadNamespace

2017-12-07 Thread James Henson
Hello R Community, I inadvertently updated packages via R Studio when a package was open. Now when R Studio is opened the message below appears in the console panel. Error in loadNamespace(name) : there is no package called ‘yaml’ Error in loadNamespace(name) : there is no package called ‘yaml’

Re: [R] Please to remove the warning when trying to check a package.

2017-12-07 Thread Duncan Murdoch
R-help is the wrong list for questions about developing packages. I'll send a reply to you and to R-package-devel, which is the right list. Duncan Murdoch On 07/12/2017 4:43 AM, Pijush Das wrote: Hello Sir, I have been trying to create a package in R. When I have put the check option in R

[R] Please to remove the warning when trying to check a package.

2017-12-07 Thread Pijush Das
Hello Sir, I have been trying to create a package in R. When I have put the check option in R studio to check everything is ok that time I have found two warnings and three notes. Those are given below. warnings: 1) * checking dependencies in R code ... WARNING '::' or ':::' import not declared

Re: [R] Dynamic reference, right-hand side of function

2017-12-07 Thread PIKAL Petr
Hi I am just curious why not to set proper form of object directly when you read it to R? Based on your example aa_2000 <- as.vector(as.matrix(read.csv(text="1,0,1,1,0,0,0,0,0,0,1,0,0", header=FALSE))) or perhaps > aa_2000<-unlist(read.csv(text="1,0,1,1,0,0,0,0,0,0,1,0,0", header=FALSE)) > i