Re: [R] R6 object that is a list of referenced object

2017-11-15 Thread Jeff Newmiller
See below. On Wed, 15 Nov 2017, Cristina Pascual wrote: Dear community, I am having a class, let's say Person, Person <- R6Class("Person", public = list( idPerson = NULL, name = NULL, age = NULL,

Re: [R] NEED HELP : Association in single DTM

2017-11-15 Thread Boris Steipe
No - the CRAN task view is not going to help you at all, since you need to think more about the question that you are trying to ask before you can start worrying about which packages to pursue it with. In your case this hinges on the question what you mean by "association". In the same phrase?

Re: [R] NEED HELP : Association in single DTM

2017-11-15 Thread Bert Gunter
In general, statistical methodology queries, which seems to be your concern, are offtopic here.This list is about R programming. Consider stats.stackexchange.com for statistical queries. However, the CRAN task view on natural language processing might be useful, so you may wish to check it: ht

Re: [R] NEED HELP : Association in single DTM

2017-11-15 Thread Rahul singh
Hi Boris, In that case, if I have lot of free text data (let us assume part of an Election speech) in one single TEXT document, and i want to find the association of the top 3 most frequently occurring words with the other words in the speech, what method do I adopt ? On Wed, Nov 15, 2017 at 7:08

Re: [R] Converting a string to variable names

2017-11-15 Thread Jim Lemon
Hi Ruiyang, In this case you don't want the "get", just the strings produced by "paste": mydf<-data.frame(col1=LETTERS[1:10],col2=1:10) rownames(mydf)<-paste("P",mydf$col1,sep="") Jim On Thu, Nov 16, 2017 at 9:22 AM, 刘瑞阳 wrote: > Hi, > > Thanks for your reply. > > I just came up with another qu

Re: [R] Converting a string to variable names

2017-11-15 Thread 刘瑞阳
Hi, Thanks for your reply. I just came up with another question about a similar but different thing: Say I have a bunch of data.frame variables named P1,P2,P3… I want to assign them row names according to symbols in the first column, and I want to do this using a for loop. How could I accompli

Re: [R] Rasterize function with maximum in R

2017-11-15 Thread Bert Gunter
I believe you should post this on the r-sig-geo list, not here. You are much more likely to find the relevant expertise there. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bl

Re: [R] Creating a SQL R package

2017-11-15 Thread Hasan Diwan
Joao, On 15 November 2017 at 05:39, João Paulo Lemes Machado < lemesmach...@gmail.com> wrote: > I intend to create a package for the R that > makes the SQL language commands available for use. What do you think? Any > tips on > where to start? > https://github.com/ggrothendieck/sqldf seems to b

[R] Rasterize function with maximum in R

2017-11-15 Thread Ashraf Afana via R-help
Hi all, I have some concerns regarding the rasterize option in R and I would like to know if the fun=max in rasterize in R provides similar results to the one achieved by using "Polygon to Raster using maximum-combined-area" in ArcGIS? I'm trying to rasterize a habitat layer to a raster of 10

[R] Creating a SQL R package

2017-11-15 Thread João Paulo Lemes Machado
Hello everyone. My name is João Paulo I am a master's student in the course of omputer science. I intend to create a package for the R that makes the SQL language commands available for use. I know that there are already some packages that execute SQL commands within R. However, most of these com

Re: [R] Problems installing mice package

2017-11-15 Thread Jérémie Juste
Hello, Many thanks for your time My mistake was to put in the .Rprofile. I've never got any problem with the package installation before though. Best regards, Jeremie On Wed, Nov 15, 2017 at 6:49 PM, David Winsemius wrote: > > > On Nov 15, 2017, at 1:08 AM, Jeremie Juste > wrote: > > > >

[R] R6 object that is a list of referenced object

2017-11-15 Thread Cristina Pascual
Dear community, I am having a class, let's say Person, Person <- R6Class("Person", public = list( idPerson = NULL, name = NULL, age = NULL, initialize = function(idPerson = NA, name =

[R] R6 object that is a list of referenced object

2017-11-15 Thread Cristina Pascual
Dear community, I am having a class, let's say Person, Person <- R6Class("Person", public = list( idPerson = NULL, name = NULL, age = NULL, initialize = function(idPerson = NA, name

Re: [R] Autologistic regression in R

2017-11-15 Thread David Winsemius
> On Nov 14, 2017, at 4:39 PM, Mingke Li wrote: > > Hi, > > I am new to autologistic regression and R. I do have questions when starting > a project in which I believe autologistic regression is needed. > > I have a point layer whose attribute table stores the values of the dependent > varia

Re: [R] Problems installing mice package

2017-11-15 Thread David Winsemius
> On Nov 15, 2017, at 1:08 AM, Jeremie Juste wrote: > > > > Hello, > > I tried intalling mice package and got the following error: > > * installing *source* package ‘mice’ ... > ** package ‘mice’ successfully unpacked and MD5 sums checked > ** libs > g++ -I/usr/local/lib/R/include -DNDEBUG

Re: [R] lapply and runif issue?

2017-11-15 Thread William Dunlap via R-help
Your lapply is making the call runif(n=3, min=i) for i in 1:3. That runif's 3 argument is 'max', with default value 1 so that is equivalent to calling runif(n=3, min=i, max=1) When i>max, outside the domain of the family of uniform distributions, runif returns NaN's. Bill Dunlap TIBCO Soft

Re: [R] ks.test() with 2 samples vs. 1 sample an distr. function

2017-11-15 Thread David L Carlson
In the first example you are performing a one-sample test against a continuous cumulative distribution (in this case a normal distribution). In the second case you are performing a two-sample test. You drew your values for x non-randomly by specifying fixed intervals along a normal distribution,

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

2017-11-15 Thread Bert Gunter
Always cc the list, which I have done here. I am not a (free) private consultant, nor do I have all the answers. Based on what you sent me, which is not what you have previously posted, you failed to load the lme3 package. See ?library. As for the appropriateness of your modeling, you should do w

Re: [R] NEED HELP : Association in single DTM

2017-11-15 Thread Boris Steipe
If you consider the definition of a DTM, and that findAssoc() computes associations between words as correlations across documents(!), you will realize that you can't what you want from a single document. Indeed, what kind of an "association" would you even be looking for? B. > On Nov 15, 20

[R] ks.test() with 2 samples vs. 1 sample an distr. function

2017-11-15 Thread tonja . krueger
Dear all, I have a question concerning the ks.test() function. I tryed to calculate the example given on the German wikipedia page. xi <- c(9.41,9.92,11.55,11.6,11.73,12,12.06,13.3) I get the right results when I calculate: ks.test(xi,pnorm,11,1) Now the question: shouldn't I obtain the same or a

Re: [R] Is there a tool to find unused functions?

2017-11-15 Thread Alexander Engelhardt
Thanks, that helps! The visualization is very messy, because I have about 100 functions, but foodweb() returns a matrix of which function calls which, and the functions callers.of("myfunc") and callees.of("myfunc") do exactly what I was looking for.  - Alex On 11/15/2017 10:44 AM, Michael Ha

[R] How to read PMML data from a text file and convert it to a model ?

2017-11-15 Thread Ashim Kapoor
Dear All, I want to save the XML representation of a model using PMML. Then I want to read the model and predict using the model and a new dataset. This is described in this blog post : https://www.r-bloggers.com/predictive-modeling-using-r-and-the-openscoring-engine-a-pmml-approach/ I am able

Re: [R] Problems installing mice package

2017-11-15 Thread Jérémie Juste
Hello, The installation of the developpment version seems to go through https://github.com/stefvanbuuren/mice, Best regards, Jeremie On Wed, Nov 15, 2017 at 10:08 AM, Jeremie Juste wrote: > > > Hello, > > I tried intalling mice package and got the following error: > > * installing *source* pa

Re: [R] Is there a tool to find unused functions?

2017-11-15 Thread Michael Hannon
mvbutils::foodweb produces a graphical display of the hierarchy (or network or ...) of function calls. Isolated functions are not called. This might help you. -- Mike On Wed, Nov 15, 2017 at 12:44 AM, Alexander Engelhardt wrote: > I've inherited a large R codebase which has grown over a few ye

[R] Problems installing mice package

2017-11-15 Thread Jeremie Juste
Hello, I tried intalling mice package and got the following error: * installing *source* package ‘mice’ ... ** package ‘mice’ successfully unpacked and MD5 sums checked ** libs g++ -I/usr/local/lib/R/include -DNDEBUG -I"/home/djj/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I/usr/local/

[R] Is there a tool to find unused functions?

2017-11-15 Thread Alexander Engelhardt
I've inherited a large R codebase which has grown over a few years and a few different developers. It contains many things I'd like to delete: - Unused functions - Variable definitions that are never called - Unreachable code I'd write that myself, it would even be fun, but I don't want to rei