Re: [R] [FORGED] Extracting specified pages from a lattice ("trellis") object.

2018-04-26 Thread Paul Murrell
Hi Does this not do what you want ... ? allpages <- dotplot(variety ~ yield | year * site, data=barley, layout=c(2,2)) page2 <- allpages[1:2, 3:4] print(page2) Paul On 24/04/18 17:51, Rolf Turner wrote: On 24/04/18 15:17, Paul Murrell wrote: Hi I think the subsetting w

Re: [R] help with tdm matrix and knn

2018-04-26 Thread Eivind K . Døvik
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hello, I downloaded your .rar-file and looked through your R-code. You should revise your script. Specifically, start by looking at what data set you are referring to when training your knn-model: you never create the object "modeldata". Best

Re: [R] Package 'data.table' in version R-3.5.0 not successfully being installed

2018-04-26 Thread Dénes Tóth
You might find this discussion useful, too: https://github.com/Rdatatable/data.table/issues/2797 On 04/26/2018 11:01 PM, Henrik Bengtsson wrote: If you're installing packages to the default location in your home account and you didn't remove those library folders, you still have you R 3.4 packa

Re: [R] Package 'data.table' in version R-3.5.0 not successfully being installed

2018-04-26 Thread Henrik Bengtsson
If you're installing packages to the default location in your home account and you didn't remove those library folders, you still have you R 3.4 package installs there, e.g. > dir(dirname(.libPaths()[1]), full.names = TRUE) [1] "/home/hb/R/x86_64-pc-linux-gnu-library/3.4" [2] "/home/hb/R/x86_64-pc

[R] help with tdm matrix and knn

2018-04-26 Thread nevergiveupno20015
hello sir im working on text classification using java and r programming i start with exporting a document term matrix (tdm) from my java programme using corpus and now i try to apply knn algorithem using the matrix and r but i cant do that any help sir here my data here my script https://m

Re: [R] Package 'data.table' in version R-3.5.0 not successfully being installed

2018-04-26 Thread Akhilesh Singh
You are right. I do take backups. But, this time I was too sure that nothing will go wrong. But, this was over-confidence. I need to take more care in future. Thanks anyway. With regards, Dr. A.K. Singh On Thu 26 Apr, 2018, 11:49 PM Duncan Murdoch, wrote: > On 26/04/2018 1:54 PM, Akhilesh Sing

Re: [R] Package 'data.table' in version R-3.5.0 not successfully being installed

2018-04-26 Thread Akhilesh Singh
My thanks to Dr. John Fox and Dr. Duncan Murdoch. But, I have upgraded all my R-3.4.3 libraries to R-3.5.0, and I have not backed-up copies of old version. So, I would give a try each to the solutions suggested by John Fox and Dengan Murdoch. With regards, Dr. A.K. Singh On Thu 26 Apr, 2018, 9:4

Re: [R] Package 'data.table' in version R-3.5.0 not successfully being installed

2018-04-26 Thread David Winsemius
> On Apr 26, 2018, at 5:07 AM, Akhilesh Singh > wrote: > > Dear Sir, > > I am using R on Windows OS platform. I upgraded my R-system to version > R-3.5.0. While upgrading my libraries in R as well as in RStudio, I am > stuck up in the package 'data.table', which is required by many other > pac

Re: [R] Package 'data.table' in version R-3.5.0 not successfully being installed

2018-04-26 Thread Duncan Murdoch
On 26/04/2018 1:54 PM, Akhilesh Singh wrote: My thanks to Dr. John Fox and Dr. Duncan Murdoch. But, I have upgraded all my R-3.4.3 libraries to R-3.5.0, and I have not backed-up copies of old version. So, I would give a try each to the solutions suggested by John Fox and Dengan Murdoch. Here

Re: [R] Package 'data.table' in version R-3.5.0 not successfully being installed

2018-04-26 Thread Fox, John
Dear Duncan, I think that your advice to downgrade may make sense if A. K. Singh actually needs to use data.table. In the case of the car package, for example, which depends on data.table indirectly via the rio package, data.table never gets used. As well, the examples and vignettes in data.tab

Re: [R] How to define mutualy exclusive parameters of a function

2018-04-26 Thread Rui Barradas
Hello, Inline. On 4/26/2018 5:42 PM, Berry, Charles wrote: On Apr 26, 2018, at 6:46 AM, Polychronis Kostoulas wrote: Dear All, apologies if this is basic: I am writing a function: fb<-function(mean, median, mode, a, b=0.95, lower=F) {} The arguments mean, median and mode are mutuall

Re: [R] How to define mutualy exclusive parameters of a function

2018-04-26 Thread Berry, Charles
> On Apr 26, 2018, at 6:46 AM, Polychronis Kostoulas > wrote: > > Dear All, > apologies if this is basic: I am writing a function: > > fb<-function(mean, median, mode, a, b=0.95, lower=F) > {} > > The arguments mean, median and mode are mutually exclusive (i.e. the user > should define o

Re: [R] Package 'data.table' in version R-3.5.0 not successfully being installed

2018-04-26 Thread Duncan Murdoch
On 26/04/2018 10:33 AM, Fox, John wrote: Dear A.K. Singh, As you discovered, the data.table package has an error under R 3.5.0 that prevents CRAN from distributing a Windows binary for the package. The reason that you weren't able to install the package from source is apparently that you haven

Re: [R] Package 'data.table' in version R-3.5.0 not successfully being installed

2018-04-26 Thread Fox, John
Dear A.K. Singh, As you discovered, the data.table package has an error under R 3.5.0 that prevents CRAN from distributing a Windows binary for the package. The reason that you weren't able to install the package from source is apparently that you haven't installed the R package-building tools

Re: [R] How to define mutualy exclusive parameters of a function

2018-04-26 Thread Eric Berger
Hi Pol, Here is one way: fb <- function(mean=NULL, median=NULL, mode=NULL, a, b=0.95, lower=F) { stopifnot ( (is.null(mean) + is.null(median) + is.null(mode)) == 2 ) etc... } HTH, Eric On Thu, Apr 26, 2018 at 4:46 PM, Polychronis Kostoulas < polychronis.kostou...@gmail.com> wrote:

[R] How to define mutualy exclusive parameters of a function

2018-04-26 Thread Polychronis Kostoulas
Dear All, apologies if this is basic: I am writing a function: fb<-function(mean, median, mode, a, b=0.95, lower=F) {} The arguments mean, median and mode are mutually exclusive (i.e. the user should define only one of these). How do I code this within the function? Thanks, Pol [[al

[R] Problem building binary data into library file

2018-04-26 Thread Steven Yen
I build binary data files into a library by placing the .rda files at the proper \data sub-folder before building the library with the following procedure: 1. File -> Open project 2. Build -> Build binary packages. This has worked up to 3 .rda files. Now, I add another .rda file to the folder. I

[R] Package 'data.table' in version R-3.5.0 not successfully being installed

2018-04-26 Thread Akhilesh Singh
Dear Sir, I am using R on Windows OS platform. I upgraded my R-system to version R-3.5.0. While upgrading my libraries in R as well as in RStudio, I am stuck up in the package 'data.table', which is required by many other packages in R-codes in my R-Markdown files. I tried to install 'data.table'