Re: [R] Complicated analysis for huge databases

2017-11-17 Thread Allaisone 1
Thanks Boris , this was very helpful but I'm struggling with the last part. 1) I combined the first 2 columns :- library(tidyr) SingleMealsCode <-unite(MyData, MealsCombinations, c(MealA, MealB), remove=FALSE) SingleMealsCode <- SingleMealsCode[,-2] 2) I separated this dataframe into

Re: [R] tcltk problems

2017-11-17 Thread Peter Langfelder
Rolf, looking at the configure script I believe you need to specify --with-tcl-config=/usr/lib/tcl8.6/tclConfig.sh and similarly --with-tk-config= HTH, Peter On Fri, Nov 17, 2017 at 8:43 PM, Rolf Turner wrote: > On 18/11/17 17:00, Erin Hodgess wrote: >> >> When I

Re: [R] tcltk problems

2017-11-17 Thread Rolf Turner
On 18/11/17 17:00, Erin Hodgess wrote: When I have compiled from sourced on Ubuntu, I did NOT include the "with-tcltk" and it worked fine.  Did you try that, please? As I said, this idea makes absolutely no sense, but OK, I tried it. And of course it didn't work. Using the newly built R I

Re: [R] tcltk problems

2017-11-17 Thread Rolf Turner
On 18/11/17 17:00, Erin Hodgess wrote: When I have compiled from sourced on Ubuntu, I did NOT include the "with-tcltk" and it worked fine.  Did you try that, please? In the past I have configured without using the "--with-tcltk" flag, and R of course built just fine. But it *did not* have

Re: [R] tcltk problems

2017-11-17 Thread Erin Hodgess
When I have compiled from sourced on Ubuntu, I did NOT include the "with-tcltk" and it worked fine. Did you try that, please? Thanks, Erin On Fri, Nov 17, 2017 at 6:34 PM, Rolf Turner wrote: > > It recently came to my attention that my R installation no longer has >

Re: [R] family

2017-11-17 Thread David Winsemius
> On Nov 17, 2017, at 4:28 PM, Val wrote: > > Hi all, > I am reading a huge data set(12M rows) that contains family information, > Offspring, Parent1 and Parent2 > > Parent1 and parent2 should be in the first column as an offspring > before their offspring information.

Re: [R] family

2017-11-17 Thread Jeff Newmiller
This question is about algorithm help... or rather, "do my work for me", not about R. Study up on "directed acyclic graphs" [1]... there actually are some packages related to such data structures on CRAN (e.g. pooh::tsort, Task View gR "gRaphical Models in R"), but you should at least be aware

Re: [R] Complicated analysis for huge databases

2017-11-17 Thread Bert Gunter
Or do it at one go using ?tapply and friends Bert On Nov 17, 2017 1:12 PM, "Boris Steipe" wrote: > Combine columns 1 and 2 into a column with a single ID like "33.55", > "44.66" and use split() on these IDs to break up your dataset. Iterate over > the list of data

Re: [R] Complicated analysis for huge databases

2017-11-17 Thread Boris Steipe
Something like the following? AllMAFs <- list() for (i in length(SeparatedGroupsofmealsCombs) { AllMAFs[[i]] <- apply(SeparatedGroupsofmealsCombs[[i]], 2, function(x)maf(tabulate(x+1))) } (untested, of course) Also the solution is a bit generic since I don't know what the output of maf()

[R] tcltk problems

2017-11-17 Thread Rolf Turner
It recently came to my attention that my R installation no longer has tcltk capability. I can't figure out why or what to do about it. I built R from source. I configured using the "--with-tcltk" flag. The build and install *seemed* to go OK, but after realising I didn't have tcltk

[R] family

2017-11-17 Thread Val
Hi all, I am reading a huge data set(12M rows) that contains family information, Offspring, Parent1 and Parent2 Parent1 and parent2 should be in the first column as an offspring before their offspring information. Their parent information (parent1 and parent2) should be set to zero, if unknown.

Re: [R] error message for function: lmer (from lme4 package)

2017-11-17 Thread David Winsemius
> snipped > > Hi, Bert, > Sorry about that! David seemed to be able to read the post since he replied. The only reason it appear readable was that you copied me as well as the list. Then HTML was still the basic format although it did npt appear that way to me since my reader could handle it

Re: [R] Complicated analysis for huge databases

2017-11-17 Thread Boris Steipe
Combine columns 1 and 2 into a column with a single ID like "33.55", "44.66" and use split() on these IDs to break up your dataset. Iterate over the list of data frames split() returns. B. > On Nov 17, 2017, at 12:59 PM, Allaisone 1 wrote: > > > Hi all .., > > >

Re: [R] Converting a string to variable names

2017-11-17 Thread MacQueen, Don
Do you mean that you have One data frame, and it has a bunch of variables within it named P1, P2, P3... or A bunch of data frames names P1, P2, P3... ? I'll assume it's the latter. Here is one way: dfnms < c('P1', 'P2', 'P3') for (nm in dfnms) { tmp <- get(nm) rownames(tmp) <-

Re: [R] HTML documentation is not in the expected location

2017-11-17 Thread Adelchi Azzalini
Thanks for the useful clarification. This has solved the issue. I am puzzled on why the problem has not shown up for a decade (at least), as I have had the HTML in place without explicitly asking for it. However, this is a lesser problem. Best wishes, Adelchi > On 17 Nov 2017, at 17:03,

Re: [R] HTML documentation is not in the expected location

2017-11-17 Thread Duncan Murdoch
On 17/11/2017 10:47 AM, Adelchi Azzalini wrote: Since I have updated my Linux system, and consequently re-installed R, I am unable to see HTML documentation which I used to access via a web browser. To be more specific, my R installation is declared to be here: > R RHOME /usr/local/lib/R

[R] HTML documentation is not in the expected location

2017-11-17 Thread Adelchi Azzalini
Since I have updated my Linux system, and consequently re-installed R, I am unable to see HTML documentation which I used to access via a web browser. To be more specific, my R installation is declared to be here: > R RHOME /usr/local/lib/R However, if I look at a location such as

Re: [R] RStudio blank upon opening

2017-11-17 Thread Michael Dewey
I believe RStudio has its own help forums where you might find expert advice. On 17/11/2017 14:15, Beginner via R-help wrote: I'm having a problem: RStudio (on  desktop comp) blank upon opening (after I update Win7). I tried different things (reinstalled R and RStudio, backuping  RStudio

Re: [R] RStudio blank upon opening

2017-11-17 Thread Jeff Newmiller
You should ask this in the RStudio support forums.. it is not about R. I will say anecdotally regarding such behavior that RStudio expects certain directories that it creates to be hidden (e.g. the .Rproj.user directory for projects) so if you copied or otherwise messed with those files then

[R] RStudio blank upon opening

2017-11-17 Thread Beginner via R-help
I'm having a problem: RStudio (on  desktop comp) blank upon opening (after I update Win7). I tried different things (reinstalled R and RStudio, backuping  RStudio settings folder... etc)! C an I launch Rstudio direct from RGui(32bit)? or some else way to solve this problem? Thanks! P.S. I 

Re: [R] Risks of using "function <- package::function" ?

2017-11-17 Thread Duncan Murdoch
On 17/11/2017 2:30 AM, Jeff Newmiller wrote: Obvious? How about "obscurity"? Just directly use pkg::fun if you have name collision. One disadvantage of this is that the availability of pkg may not be checked until you use it. Package checks will complain if you haven't declared in the

Re: [R] Dataframe is character

2017-11-17 Thread Ivan Calandra
Good one, did not even notice that...! -- Dr. Ivan Calandra TraCEr, laboratory for Traceology and Controlled Experiments MONREPOS Archaeological Research Centre and Museum for Human Behavioural Evolution Schloss Monrepos 56567 Neuwied, Germany +49 (0) 2631 9772-243

Re: [R] Dataframe is character

2017-11-17 Thread Petra Oleum
class("dat") is different from class(dat), which is what you actually want. On 17-11-17, P. Roberto Bakker wrote: > Hi everybody, > > Question: why are my dataframe and numeric variables a character? > > I read an excel file via readxl but my dataframe is a character, and > numeric variables,

Re: [R] Dataframe is character

2017-11-17 Thread Ivan Calandra
Hi Roberto, This often happens when there are some non-numeric characters. You would have to check it. Without more information, e.g. dput(dat), you will have to find by yourself. HTH, Ivan -- Dr. Ivan Calandra TraCEr, laboratory for Traceology and Controlled Experiments MONREPOS

[R] Dataframe is character

2017-11-17 Thread P. Roberto Bakker
Hi everybody, Question: why are my dataframe and numeric variables a character? I read an excel file via readxl but my dataframe is a character, and numeric variables, eg "yi", are also a character. My excelfile is in English numeric Sometimes the dataframe was indeed a dataframe, but I do not

[R] Multivariate mixture distributions

2017-11-17 Thread psoppat via R-help
Hello, I am searching for a way to generate random values from a multivariate mixture distribution. For starters, one could create a mixture distribution consisting of a gamma or normal distribution and then a tail/spike of values in a normal distribution (eg as in Figure 1, A

Re: [R] Risks of using "function <- package::function" ?

2017-11-17 Thread Eric Berger
As Jeff recommends, I use the pkg::fun for clarity. However I probably use it more than needed (e.g. I use the dplyr:: prefix on all dplyr function calls instead of just the functions with name collisions). Are there any tools that can be used (like a form of lint) to identify uses of functions

[R] How to produce rainfall maps

2017-11-17 Thread Stefano Sofia
Dear R users, I need to produce rainfall maps using R. I know that this is possible, I looked though the web, I found the example below reported (the author is Andrew Tredennick). I would ask you if this is the most performing way to make rainfall maps; if yes would someone be able to give me an