Re: [R] [Rd] I do not want that R CMD build removes temp directory

2022-12-19 Thread Witold E Wolski
ARM M1. R version 4.2.2 (2022-10-31 ucrt) -- "Innocent and Trusting" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) best regards Witek On Fri, 16 Dec 2022 at 11:24, Uwe Ligges wrote: > > > > On 15.12.2022 21:47,

Re: [R] [Rd] I do not want that R CMD build removes temp directory

2022-12-15 Thread Witold E Wolski
nd the non-functional package > will still be installed so you can inspect it. > > Cheers, > Simon > > PS: please don't cross-post > > > > On Dec 16, 2022, at 7:01 AM, Witold E Wolski wrote: > > > > I am getting a package build error, and can not figure out the

[R] I do not want that R CMD build removes temp directory

2022-12-15 Thread Witold E Wolski
I am getting a package build error, and can not figure out the problem. The error is " ERROR: lazy loading failed for package 'prolfqua' * removing 'C:/Users/ " However since R CMD build removes the temp directory and does not give any other errors how can I find out what the build problem is? Is

Re: [R] Package installation for 4.1 on windows.

2021-06-10 Thread Witold E Wolski
Dear Duncan, Thank you. Indeed I did had the R_LIBS_USER env. variable defined. Best regards Witold On Mon, 7 Jun 2021 at 17:48, Duncan Murdoch wrote: > > On 07/06/2021 10:37 a.m., Witold E Wolski wrote: > > Hello, > > > > I just installed R 4.1 and now trying to upda

[R] Package installation for 4.1 on windows.

2021-06-07 Thread Witold E Wolski
Hello, I just installed R 4.1 and now trying to update install some packages. R version 4.1.0 (2021-05-18) -- "Camp Pontanezen" Copyright (C) 2021 The R Foundation for Statistical Computing But when installing packages I read: Installing packages into

Re: [R] brms does not work with R4.0.2

2020-07-13 Thread Witold E Wolski
evert to rstan 2.19.3." Thanks Witek On Mon, 13 Jul 2020 at 15:41, Witold E Wolski wrote: > > Hello, > > I upgraded today to R4.0.2 from 3.6.3 on my Windows machine (actually > 2 of them - first desktop and then laptop just to verify the problem) > and on both of them I am

[R] brms does not work with R4.0.2

2020-07-13 Thread Witold E Wolski
Hello, I upgraded today to R4.0.2 from 3.6.3 on my Windows machine (actually 2 of them - first desktop and then laptop just to verify the problem) and on both of them I am getting the following error when running the brms::brm function example code. ``` > bprior1 <- prior(student_t(5,0,10),

[R] smoothScatter() and the KernSmooth package

2020-06-17 Thread Witold E Wolski
Hello, I am getting the following error when running a package check ``` Error in loadNamespace(name) : there is no package called 'KernSmooth' Calls: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart Execution halted ``` The error happens in a function which calls

[R] decomposing a string representing a valid mathematical expression?

2019-10-29 Thread Witold E Wolski
Hello, I would like to decompose a string i.e. "a - b" or "a +b" into an array or list ["a","-","b"] Since R knows how to parse expressions these type of expressions I would like to reuse some existing functions and not to use gsub or strsplit etc. Thank you Witek -- Witold Eryk Wolski

Re: [R] stats::power.t.test error

2019-10-15 Thread Witold E Wolski
gher power with n=2. (Also, anything with single-digit degrees of > freedom for variance is probably expecting rather much regarding to Gaussian > distribution of your data.) > > -pd > > > On 4 Oct 2019, at 14:30 , Witold E Wolski wrote: > > > > Hi,

[R] stats::power.t.test error

2019-10-04 Thread Witold E Wolski
Hi, power.t.test works for some range of input parameters but fails otherwise. > power.t.test(delta = 0.5849625, sd=0.1, power=0.8, sig.level=0.05)$n [1] 1.971668 > power.t.test(delta = 0.5849625, sd=0.05, power=0.8, sig.level=0.05)$n [1] 1.620328 > power.t.test(delta = 0.5849625, sd=0.01,

[R] linear model contrast in R

2019-05-13 Thread Witold E Wolski
I am looking for a function to compute contrasts with a interface similar to that of lmerTest::contest multcomp::glht i.e. taking the model and a contrast vector or matrix as an argument, but for linear models, and without the multiple testing adjusted made by multcomp::glht. Thank you --

[R] isSingular for lm?

2019-04-05 Thread Witold E Wolski
lme4 has a function isSingular to check if the fitted model is Singular, Although lm has the parameter singular.ok = TRUE by defualt, I could not find a function to check if the fitted model is singular. What would be the correct way to implement such a function for and lm object? Check if

[R] randomForest out of bag prediction

2019-01-12 Thread Witold E Wolski
Hello, I am just not sure what the predict.RandomForest function is doing... I confused. I would expect the predictions for these 2 function calls to predict the same: ```{r} diachp.rf <- randomForest(quality~.,data=data,ntree=50, importance=TRUE) ypred_oob <- predict(diachp.rf) dataX <- data

[R] Visualizing contrasts for lmer models

2018-12-13 Thread Witold E Wolski
Hello, Is there an R-package which implements visualizations of estimated coefficients and the data for lmer models similar to those shown here: http://genomicsclass.github.io/book/pages/interactions_and_contrasts.html in sections: Examining the estimated coefficients (ideally with ggplot) ???

[R] See section 'Good practice' in '?data'.

2016-12-10 Thread Witold E Wolski
To which document "See section 'Good practice' in '?data'." refers too? Found the following calls to data() loading into the global environment: File 'bibliospec/R/annotateClass.R': data("AminoAcids") See section 'Good practice' in '?data'. Thanks -- Witold Eryk Wolski

[R] Error: XYZ is not an exported object

2016-12-10 Thread Witold E Wolski
I am wrting a package and would like to be able to export it to access it with: packagename::dataset This is how my roxygen doc for the data object looks like: #' Data frame with amino acid masses #' #' @name AminoAcids #' @docType data #' @keywords data #' @export NULL It does end up in the

[R] create n suffixes of length 1:n from string of length n

2016-10-19 Thread Witold E Wolski
Is there a build in function, which creates n suffixes of length 1:n from string of length n? e.g given abcd produces "a" "ab" "abc" FAST. equally nice to have would be: e.g. given c("a", "b", "c") produces "a" "a","b" "a","b","c" Thank you Witold -- Witold Eryk Wolski

[R] rstudio mailing list

2016-10-19 Thread Witold E Wolski
Is there a mailing list for Rstudio related questions? I searched the web but did not find one. Thank you -- Witold Eryk Wolski __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] documenting R reference class methods with roxygen2

2016-07-20 Thread Witold E Wolski
I would like to document function arguments in R reference classes and I do not know how. I know that methods description can be provided by adding a string below the function declaration. But how to document the function arguments in similar fashion like the arguments of R functions (which can

Re: [R] [FORGED] Splitting data.frame into a list of small data.frames given indices

2016-07-02 Thread Witold E Wolski
" > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Fri, Jul 1, 2016 at 7:40 AM, Witold E Wolski <wewol...@gmail.com> wrote: >> Hi William, >> >> I tested plyrs dlply function, and it seems to have have an O(N* >> log(

Re: [R] [FORGED] Splitting data.frame into a list of small data.frames given indices

2016-07-01 Thread Witold E Wolski
> variable and use mapply on the resulting lists. > > The plyr and dplyr packages were developed to deal with this > sort of problem. Check them out. > > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > On Wed, Jun 29, 2016 at 6:21 AM, Witold E Wols

Re: [R] [FORGED] Splitting data.frame into a list of small data.frames given indices

2016-06-29 Thread Witold E Wolski
w(dum } res <- do.call("rbind",res) plot(nrows^2, res[,"elapsed"]) And I can't see a reason why this has to be so slow. cheers On 29 June 2016 at 12:00, Rolf Turner <r.tur...@auckland.ac.nz> wrote: > On 29/06/16 21:16, Witold E Wolski wrote: >> >>

[R] Splitting data.frame into a list of small data.frames given indices

2016-06-29 Thread Witold E Wolski
It's the inverse problem to merging a list of data.frames into a large data.frame just discussed in the "performance of do.call("rbind")" thread I would like to split a data.frame into a list of data.frames according to first column. This SEEMS to be easily possible with the function base::by.

Re: [R] performance of do.call("rbind")

2016-06-27 Thread Witold E Wolski
> 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 "Bloom County" comic strip ) > > > On Mon, Jun 27, 2016 at 8:51 AM,

[R] refclasses question - Defining accessor function

2016-06-27 Thread Witold E Wolski
Are accessors a fancy feature that do not work? I wanted to use accessor functions in a R refclass to hide the classes implementation where I am using sqlite. What I did observe is, that if I access in a method any of the fields (in the example below field .data in method printExample) all the

[R] performance of do.call("rbind")

2016-06-27 Thread Witold E Wolski
I have a list (variable name data.list) with approx 200k data.frames with dim(data.frame) approx 100x3. a call data <-do.call("rbind", data.list) does not complete - run time is prohibitive (I killed the rsession after 5 minutes). I would think that merging data.frame's is a common operation.

[R] numeric inputs to sweep produce NaN...

2016-05-24 Thread Witold E Wolski
I have two inputs to sweep which are numeric (with a few NA's) but the output is NaN. How Why? > sum(!is.numeric(unlist(protquant))) [1] 0 > sum(!is.numeric(normalize)) [1] 0 > normprotquant <- sweep(protquant, 2, normalize, "-" ) > sum(is.nan(unlist(normprotquant))) [1] 31 version R 3.3.0

Re: [R] how to manipulate ... in the argument list

2016-05-12 Thread Witold E Wolski
ead of ... best On 11 May 2016 at 15:45, Vito M. R. Muggeo <vito.mug...@unipa.it> wrote: > Hi Witold, > use do.call() > > list.args<-list(...) > > #modify 'list.args' (add/delete/modify) > > do.call(image, list.args) > > best, > vito > > > Il

[R] how to manipulate ... in the argument list

2016-05-11 Thread Witold E Wolski
Hi, I am looking for a documentation describing how to manipulate the "..." . Searching R-intro.html gives to many not relevant hits for "..." What I want to do is something like this : image.2 <- function(x, col , ...){ # function is manipulating colors (adding a few) # since it changes

[R] packaging an R-application

2015-12-23 Thread Witold E Wolski
Dear List, What I am seeking advice for is how to best package an R installation with all the packages required? Scenario: I need to deliver an R script which will have quite a bit of package dependencies, to packages which are not necessarily stable, are not on cran and might dissapear in the

[R] conditionally disable evaluation of chunks in Rmarkdown...

2015-11-10 Thread Witold E Wolski
I do have an Rmd where I would like to conditionally evaluate the second part. So far I am working with : ```{r} if(length(specLibrary@ionlibrary) ==0){ library(knitr) opts_chunk$set(eval=FALSE, message=FALSE, echo=FALSE) } ``` Which disables the evaluation of subsequent chunks. However my

[R] r-markdown - keeping figures

2015-10-20 Thread Witold E Wolski
I am running r-markdown from r-studio and can't work out how to keep the figures. I mean I have a few figures in the document and would like to have them as separate pdf's too as I have been used to have them when using Sweave. best regards Witold -- Witold Eryk Wolski

Re: [R] names in R list's

2015-09-08 Thread Witold E Wolski
bedded Controllers) .OO#. .OO#. rocks...1k > --- > Sent from my phone. Please excuse my brevity. > > On September 7, 2015 3:34:53 AM PDT, Witold E Wolski <wewol...@gmail.com> > wrote: >

[R] names in R list's

2015-09-07 Thread Witold E Wolski
What is the access time for R lists given a name of list element, is it linear, log, or constant? Than what are to rules for names in R-lists That reusing names is possible makes me wonder. tmp <- as.list(c(1,2,3,4)) names(tmp) = c("a","a","b","b") tmp tmp$a What I am looking for is a

Re: [R] registerDoParallel and R CMD check --as-cran errors

2015-09-03 Thread Witold E Wolski
To answer my own question. Dono if it's the right way to do... In the example code I am using a single CPU and it works. regards PS. Should I have asked this question on the devel list? On 2 September 2015 at 14:39, Witold E Wolski <wewol...@gmail.com> wrote: > I am testing

[R] registerDoParallel and R CMD check --as-cran errors

2015-09-02 Thread Witold E Wolski
I am testing a package with R CMD check and R CMD check --as-cran some code which is run in the examples section uses the foreach and doParallel package. When run with --as-cran I have an error. registerDoParallel function causes an error. Error in .check_ncores(length(names)) : 6

[R] data - stringAsFactors = FALSE

2015-09-01 Thread Witold E Wolski
I have a tab delimited table in the data directory of a package. I would like that when loading this data with data(tablename) in the example section the strings are not coerced to factors. How can I achieve it? Or should I move this tables to the inst/extdata directory and load them with

Re: [R] compiling Rmd - can't find tex file....

2015-08-27 Thread Witold E Wolski
to answer my own question. I did not find out what knit2pdf is good for but rmarkdown::render does the job. regards On 26 August 2015 at 11:46, Witold E Wolski wewol...@gmail.com wrote: I am using from within R-studio and the .Rmd file builds nicely. However, when I try to compile

[R] compiling Rmd - can't find tex file....

2015-08-26 Thread Witold E Wolski
I am using from within R-studio and the .Rmd file builds nicely. However, when I try to compile the fiel using : knit2pdf( specL.Rmd, output=file.path(res.12345,specL.pdf) ) I am getting tex errors (see below). When I wan't to check what's wrong I can't find the tex file. Any ideas? Thank you

[R] Faster text search in document database than with grep?

2015-08-03 Thread Witold E Wolski
I have a database of text documents (letter sequences). Several thousands of documents with approx. 1000-2000 letters each. I need to find exact matches of short 3-15 letters sequences in those documents. Without any regexp patterns the search of one 3-15 letter words takes in the order of 1s.

Re: [R] Faster text search in document database than with grep?

2015-08-03 Thread Witold E Wolski
. On 3 August 2015 at 15:13, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 03/08/2015 5:25 AM, Witold E Wolski wrote: I have a database of text documents (letter sequences). Several thousands of documents with approx. 1000-2000 letters each. I need to find exact matches of short 3

Re: [R] sort order of a character sequence is different on windose and linux (linux result)

2014-07-08 Thread Witold E Wolski
impractical to use, with data which is avaiable today. On 6 July 2014 14:15, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 06/07/2014, 7:56 AM, Witold E Wolski wrote: This is the info I got from the data.table developers... Seems that they did have tried to find a more elegant solution solution

[R] sort order of a character sequence is different on windose and linux (linux result)

2014-07-06 Thread Witold E Wolski
This is the result of sorting a character sequence on a linux box (with R . 3.10) bla = read.table(xx.txt,stringsAsFactors=F) bla = bla[,1] bla[1:10] [1] 1000_DGFVALSK_2_run0 1000_DGFVALSK_2_run0 1000_DGFVALSK_2_run0 1000_DGFVALSK_2_run0 1000_DGFVALSK_2_run0 [6] 1000_DGFVALSK_2_run0

[R] sort order of a character sequence is different on windose and linux (windows result)

2014-07-06 Thread Witold E Wolski
And here is the result when sorting the same sequence on a windows box: bla = read.table(xx.txt,stringsAsFactors=F) bla = bla[,1] bla[1:10] [1] 1000_DGFVALSK_2_run0 1000_DGFVALSK_2_run0 1000_DGFVALSK_2_run0 1000_DGFVALSK_2_run0 [5] 1000_DGFVALSK_2_run0 1000_DGFVALSK_2_run0

Re: [R] sort order of a character sequence is different on windose and linux (linux result)

2014-07-06 Thread Witold E Wolski
It seems that the package I am developing depends on the locale C because of interactions with other packages (data.table). So I would like to set the locale to C as soon as the package is loaded. Where can I do it .. I could of course set it in every function in my package but...

Re: [R] sort order of a character sequence is different on windose and linux (linux result)

2014-07-06 Thread Witold E Wolski
, we support only C-locale. On 6 July 2014 13:33, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 06/07/2014, 7:19 AM, Witold E Wolski wrote: It seems that the package I am developing depends on the locale C because of interactions with other packages (data.table). So I would like to set

Re: [R] how does a valid subscript can produce an subscript out of bounds error?

2014-07-05 Thread Witold E Wolski
, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 04/07/2014, 6:35 PM, Witold E Wolski wrote: how does a valid subscript (see first 2 lines) can produce an subscript out of bounds error (see line 4)? 1 sum(!rownames(msexp$rt) %in% msexp$pepinfo$transition_group_id) [1] 0 2 sum(!msexp

[R] data.table merge question...

2014-07-04 Thread Witold E Wolski
Actually the question is regarding differences in behaviour on windows in linux. The 2 lines of code produce on linux all TRUE on windows this looks heterogenous... Using merge.data.frame produces on all platforms TRUE ... msexp$pepinfo =

[R] how does a valid subscript can produce an subscript out of bounds error?

2014-07-04 Thread Witold E Wolski
how does a valid subscript (see first 2 lines) can produce an subscript out of bounds error (see line 4)? 1 sum(!rownames(msexp$rt) %in% msexp$pepinfo$transition_group_id) [1] 0 2 sum(!msexp$pepinfo$transition_group_id %in% rownames(msexp$rt)) [1] 0 3 class(msexp$rt) [1] matrix 4 msexp$rt =

[R] How to document an S3 class?

2014-06-30 Thread Witold E Wolski
Hi, How do I document an S3 class with roxygen2? I create the class at the end of the method with: class(res) - myclass but how do I create an documentation entry for this class, where I can describe the fields of the class (in case of myclass these are just list entries)? regards --

[R] correlation given p value and sample size

2014-06-16 Thread Witold E Wolski
Hi, Looking for and function which produces the minimum r (pearson correlation) so that H0 (r=0) can be rejected, given sample size and p-value? Witold -- Witold Eryk Wolski __ R-help@r-project.org mailing list

[R] Rscript and roxygen error

2014-05-26 Thread Witold E Wolski
I do want to run a R script (runrox.sh) containing two commands: library(roxygen2) roxygenize(imsbInfer) When pasting these 2 lines into R they run with no error. But when calling: Rscript runrox.sh the script produces this error: roxygen fails with Error: Failure in roxygen block beginning

Re: [R] Rscript and roxygen error

2014-05-26 Thread Witold E Wolski
the same script which is not working with Rscript does work with R CMD BATCH. I thought the main difference between Rscript and R CMD BATCH is where the ouptut gets redirected and that Rscript should preferred over the old R CMD BATCH. On 26 May 2014 15:12, Witold E Wolski wewol

[R] How to build and check an package on a system without tex latex?

2014-05-26 Thread Witold E Wolski
This is what I tried: R CMD check $(PKGNAME)_$(PKGVERS).tar.gz --no-manual --no-rebuild-vignettes R CMD build --no-manual --no-rebuild-vignettes $(PKGSRC) But still somehow the R CMD build attempts to build the vignettes (OK with me), but also run texi2dvi on them producing the error message

[R] Documenting docType data

2014-05-20 Thread Witold E Wolski
Hi, I am Trying to document data using roxygen2 by following the stackoverflow question: http://stackoverflow.com/questions/9561684/documenting-dataset-with-roxygen2 And although my data resigin in mypackage/data has extension .rda and .csv I am getting the same error as in the stackoverlfow

Re: [R] Documenting docType data

2014-05-20 Thread Witold E Wolski
E Wolski wewol...@gmail.com wrote: Hi, I am Trying to document data using roxygen2 by following the stackoverflow question: http://stackoverflow.com/questions/9561684/documenting-dataset-with-roxygen2 And although my data resigin in mypackage/data has extension .rda and .csv I am getting

Re: [R] dist like function but where you can configure the method

2014-05-16 Thread Witold E Wolski
the iteration is made in native code. On 16 May 2014 15:57, Jari Oksanen jari.oksa...@oulu.fi wrote: Witold E Wolski wewolski at gmail.com writes: Looking for an fast dist implementation where I could pass my own dist function to the method parameter i.e. mydistfun = function(x,y

Re: [R] dist like function but where you can configure the method

2014-05-16 Thread Witold E Wolski
()) user system elapsed 3.470.003.48 Rui Barradas Em 16-05-2014 17:12, Barry Rowlingson escreveu: On Fri, May 16, 2014 at 4:46 PM, Witold E Wolski wewol...@gmail.com wrote: Dear Jari, Thanks for your reply... The overhead would be 2 for loops for(i in 1:dim(x)[2]) for(j

[R] dist like function but where you can configure the method

2014-05-15 Thread Witold E Wolski
Looking for an fast dist implementation where I could pass my own dist function to the method parameter i.e. mydistfun = function(x,y){ return(ks.test(x,y)$p.value) #some mystique implementation } wow = dist(data,method=mydistfun) thanks -- Witold Eryk Wolski

[R] S3 - how to implement colnames-

2014-05-14 Thread Witold E Wolski
Have a class for which I would like to provide a colnames-.myclass function so that colnames(myintsance) - c(a,b,c) can be called. Witold -- Witold Eryk Wolski [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] S3 - how to implement colnames-

2014-05-14 Thread Witold E Wolski
*very* impolite. As this is a question for R-help only, i.e., not fit for R-devel anyway : Witold E Wolski wewol...@gmail.com on Wed, 14 May 2014 10:57:09 +0200 writes: Have a class for which I would like to provide a colnames-.myclass function so that colnames

[R] roxygen2 question

2014-05-14 Thread Witold E Wolski
How to document S3Methods with roxygen so that I have only 1 entry in the package documentation page per S3Method. In the package documentation page they show up than as follows read2msExperiment read 2 feature alginer long format and generate an msexperiment read2msExperiment.data.frame convert

[R] installing r on ubuntu ?

2014-04-07 Thread Witold E Wolski
Hi, trying to install newest R on ubuntu I follow the instructions at: http://cran.at.r-project.org/bin/linux/ubuntu/ I added: deb http://cran.r-mirror.de/bin/linux/ubuntu saucy/ to: /etc/apt/sources.list running : sudo apt-get update produces : W: GPG error: http://cran.r-mirror.de

[R] how to check capabilities of an graphics device?

2014-03-24 Thread Witold E Wolski
Before plotting to an device, I would like check which capabilities/properties it has to avoid warnings such as: In plot.xy(xy, type, ...) : semi-transparency is not supported on this device: reported only once per page -- Witold Eryk Wolski __

[R] Can't write to an device after catching a warning.

2014-03-24 Thread Witold E Wolski
I have some code to handle warnings thrown because a device does not support some features: bla = tryCatch( plot(d$ratio,-log10(d$pvals),col=#0033,pch=19,xlab=xlab, ylab=ylab), warning=function(bla){dev.off(); return(1)} ) if(!is.null(bla)){

[R] data.table - How do I transform a set of column?

2014-03-17 Thread Witold E Wolski
I started to use the data.table to subset, reshape large data. But how do I transform a set of columns? # for a data.frame I would do: df = data.frame(a = c(a,b,c,d), b = 1:4,c = 1:4) df[,2:3] = df[,2:3]^2 # but with data.table this somehow similar code produces an error. dt = data.table(a =

[R] data.table and R package check

2014-03-14 Thread Witold E Wolski
Hi, using data.table in package code i.e setkey(aligtable,transition_group_id,align_origfilename) aligtable = aligtable[CJ(unique(transition_group_id), unique(align_origfilename))] When I do run R package check I got warnings such as: convert2msExperiment: no visible binding for global

[R] stats::runmed - crashes R - session

2014-02-03 Thread Witold E Wolski
R version 3.0.1 (2013-05-16) -- Good Sport Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) length(log2ro) [1] 16152 summary(log2ro) Min. 1st Qu. MedianMean 3rd Qu.Max.NA's -10 0 0 Inf 0 Inf

[R] match - returns a vector of the positions of (first) matches - looking for All positions.

2014-02-03 Thread Witold E Wolski
Looking for a build in function which returns a vector of the positions of _ALL_ matches. -- Witold Eryk Wolski __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] match - returns a vector of the positions of (first) matches - looking for All positions.

2014-02-03 Thread Witold E Wolski
, PIKAL Petr petr.pi...@precheza.cz wrote: Hi which(table == match) or which(table %in% match) Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Witold E Wolski Sent: Monday, February 03, 2014 11:19 AM To: r-help@r

Re: [R] match - returns a vector of the positions of (first) matches - looking for All positions.

2014-02-03 Thread Witold E Wolski
Unsuffered Consequences Regards Petr -Original Message- From: Witold E Wolski [mailto:wewol...@gmail.com] Sent: Monday, February 03, 2014 1:07 PM To: PIKAL Petr Cc: r-help@r-project.org Subject: Re: [R] match - returns a vector of the positions of (first) matches - looking

[R] image plot with color scale

2013-11-19 Thread Witold E Wolski
I am plotting an image of correlations but need to add a color scale... dat-matrix(rnorm(1000),ncol=5) labels=c(a,b,c,d,e) cortmp - cor(dat) image(cortmp , axes = F ) axis( 1, at=seq(0,1,length=length(labels)) , labels=labels , cex.axis=0.8 ,srt = 45,las=2,cex=1) axis( 2,

[R] writing blobs with RDBI

2013-11-05 Thread Witold E Wolski
How to write a blob with RDBI? assuming I have x - 1:10 * 0.1 How do I store it in a sql table as an blob? regards -- Witold Eryk Wolski __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] pairs plot

2013-10-10 Thread Witold E Wolski
my data are matrix with 3 numeric columns. would like to have pairs plot with scatterplots in the upper with hist at the diag and with correlation at the lower. actually default pairs does almost what I want but looks semi awesome. Especially, i didn't find out how to remove the axes from the

[R] how to pairs plot without axes

2013-10-09 Thread Witold E Wolski
In the pairs help is an example how to plot the correlation as txt. How do I get rid of the axes in the upper panel? regards ## put (absolute) correlations on the upper panels, ## with size proportional to the correlations. panel.cor - function(x, y, digits = 3, prefix = , cex.cor,axis=F, ...)

[R] igraph vertex.label.font sans serif

2013-08-20 Thread Witold E Wolski
Would like to plot vertex labels without serif. there is vertex.label.font param but he lets me choose only between one font type in normal bold and emph. any suggestions welcome. -- Witold Eryk Wolski __ R-help@r-project.org mailing list

Re: [R] igraph vertex.label.font sans serif

2013-08-20 Thread Witold E Wolski
recall. it's: vertex.label.family sorry On 20 August 2013 17:30, Witold E Wolski wewol...@gmail.com wrote: Would like to plot vertex labels without serif. there is vertex.label.font param but he lets me choose only between one font type in normal bold and emph. any suggestions welcome

[R] parcor package example for adalasso.net fails.

2013-08-15 Thread Witold E Wolski
Hi, I am a bit surprised that an example code from an R-package installed from CRAN can fail: n-20 p-10 X-matrix(rnorm(n*p),ncol=p) pc-adalasso.net(X,k=5) Performing local (adaptive) lasso regressions Vertex no Error in glmnet(XXtrain, ytrain, type.gaussian = type, standardize = FALSE) :

[R] storing multidimensional arrays - save and load -

2013-08-14 Thread Witold E Wolski
I am have a procedure which generates multidimensional arrays. To compute them is expensive so I want to store them in order to be able to analyse them later. I am using at the moment problem is that the array is always assigned to a variable ma (the computation is in a loop). Than I generate a

[R] breaks argument in heatmap.2 doesn't do what it should I think

2013-08-06 Thread Witold E Wolski
I do set the breaks parameter in heatmap.2 I would expect that the color.key and the histogram (the thing in the top left of the plot) are aligned. Just that everyone can reproduce the problem: mypalette-brewer.pal(11,RdYlBu) ddd - rnorm(400,0,0.1) mdd - matrix(ddd,ncol=50) hm -

[R] help.start

2013-08-06 Thread Witold E Wolski
Does anyone also observes with R 3.1 (on linux) that the help.start function frequently blocks the R session (never returns) ? Can I do anything or just waith for R3.1.1? -- Witold Eryk Wolski __ R-help@r-project.org mailing list

Re: [R] help.start

2013-08-06 Thread Witold E Wolski
Dear Martin I mean R version 3.0.1 (2013-05-16) -- Good Sport On 6 August 2013 16:55, Martin Maechler maech...@stat.math.ethz.ch wrote: Witold E Wolski wewol...@gmail.com on Tue, 6 Aug 2013 16:40:42 +0200 writes: Does anyone also observes with R 3.1 (on linux) that the help.start

[R] When scale is applied in heatmap

2013-08-05 Thread Witold E Wolski
When clustering I would do something like plot(hclust(dist(scale(X In case of heatmap and heatmap.2 it seems to me that for the dendrograms plot(hclust(dist(X))) is done while for the heatmap image(scale(X)) is done. I would say this is a bug however, because this is consistent among the

Re: [R] heatmap scale parameter question

2013-08-01 Thread Witold E Wolski
I do not want to use the b word, but can anyone who also subscribes to the r-developer list forward my observation regarding heatmap? I am pretty confident that the behaviour of heatmap in R 3.0.1 is not that one intended. On 31 July 2013 14:03, Witold E Wolski wewol...@gmail.com wrote: Would

[R] heatmap scale parameter question

2013-07-31 Thread Witold E Wolski
Would anyone of the more experienced r-users explain to me the behaviour of the scale parameter in the heatmap function. different options for scale (R 3.0.1) do change only the colors but do not affect the dendrograms. Please see for yourself executing the following code: d -

[R] heatmap scale parameter

2013-07-25 Thread Witold E Wolski
does change only the colors but dendrograms are unaffected. d - matrix(rnorm(100),nrow=20) heatmap(d) heatmap(d,scale=column) heatmap(d,scale=row) heatmap(d,scale=none) However scaling clearly affects clustering. see: d - scale(d) heatmap(d,scale=none) R version 3.0.1 (2013-05-16) -- Good

[R] function 2 convert matrix to long-format?

2013-07-24 Thread Witold E Wolski
I would like to convert this (output of tapply) , , minus B6 S9 T0 0.1416 0.12235 T1 0.1049 0.11890 T2 0.1328 0.15510 , , plus B6 S9 T0 0.14225 0.16875 T1 0.09295 0.09900 T2 0.13350 0.14560 to long-format : T0 B6 minus 0.1416 T0 S9 minus 0.12235 T0 B6 plus 0.14225 T0

Re: [R] function 2 convert matrix to long-format?

2013-07-24 Thread Witold E Wolski
RECALL : found the answer: use aggregate instead of tapply thx On 24 July 2013 12:00, Witold E Wolski wewol...@gmail.com wrote: I would like to convert this (output of tapply) , , minus B6 S9 T0 0.1416 0.12235 T1 0.1049 0.11890 T2 0.1328 0.15510 , , plus B6 S9

[R] anti off diagonal min max mean - how to rotate matrix by 90 degree

2013-07-17 Thread Witold E Wolski
How can id do this efficiently in R ? 1 0 0 0 2 0 0 0 3 rotate right 0 0 1 0 2 0 3 0 0 rotate left 0 0 3 0 2 0 1 0 0 What I want to do is described here: http://stackoverflow.com/questions/13049575/r-min-max-and-mean-of-off-diagonal-elements-in-a-matrix but I want do to it for all

[R] cut into groups of equal nr of elements...

2013-07-17 Thread Witold E Wolski
I would like to cut a vector into groups of equal nr of elements. looking for a function on the lines of cut but where I can specify the size of the groups instead of the nr of groups. -- Witold Eryk Wolski __ R-help@r-project.org mailing list

[R] robust smoothing - median smoothing.

2013-07-17 Thread Witold E Wolski
Looking for robust smoothing methods available in R... a robust version of lowess or smooth.spline. Was searching for median and smoothing but the search engine isn't calibrated . -- Witold Eryk Wolski __ R-help@r-project.org mailing list

[R] file.stem?

2013-07-15 Thread Witold E Wolski
Looking for a function which returns the stem of the filename given a path. i.e. file.stem(/the/path/to/afile.txt) afile regards -- Witold Eryk Wolski [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] file.stem?

2013-07-15 Thread Witold E Wolski
) Hope this helps, Rui Barradas Em 15-07-2013 15:23, Witold E Wolski escreveu: Looking for a function which returns the stem of the filename given a path. i.e. file.stem(/the/path/to/afile.txt) afile regards -- Witold Eryk Wolski

[R] disabling vignette creation in R CMD build

2013-07-08 Thread Witold E Wolski
While developing a package I would like to disable vignette creation when executing R CMD build. The vignette creation is costly so I would prefer not to have to regenerate it every time. regards -- Witold Eryk Wolski [[alternative HTML version deleted]]

[R] create index for tapply or by

2013-06-27 Thread Witold E Wolski
Is there a build in function to create an index for tapply or by given a a numeric vector x an a vector of breaks? What I want to do is: x - 1:100 breaks - c(0,10,20,50,99,110) y - rep(0,length(x)) for(i in 2:length(breaks)){ y[which(xbreaks[i-1] x = breaks[i])] - i } by(x,y,sum) but I

[R] write table without quotation marks in column names....

2013-05-30 Thread Witold E Wolski
Hi write.table likes to quote () the column and row names. Is there a way to switch it off? Witold [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] sweave xtable and driver RweaveHTML

2012-11-08 Thread Witold E Wolski
Hi, So far I used Sweave to create pdf reports. I used xtable to create some tables in the report. But now I would like to use the same snw file to generate an HTML version. The xtable output breaks the RweaveHTML driver. library(R2HTML) Sweave('analyseLFQ.Snw', driver = RweaveHTML) Error in

[R] Sweave - if \Sexpr{} than \SweaveInput{my.Rnw}

2012-09-20 Thread Witold E Wolski
Depending on an R computation I would like to include an Sweave documents in the main Sweave document. How can I do it? So I was thinking to use Latex features : \newif\ifpaper \ifpaper \SweaveInput{my1.Rnw} \else \SweaveInput{my2.Rnw} \fi But how do I set paper to true or false given