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

2022-12-19 Thread Witold E Wolski
M1, linux ARM64, linux x86, Windows 64, and it works everywhere except Parallels Windows 64 on 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 Wite

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

2022-12-15 Thread Witold E Wolski
--no-test-load and 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, a

[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 ‘C:/Users/wolski/Documents/R/win-library/4.

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), class

[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 gr

[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, power=

[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 -- Wit

[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 df.res

[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 nam

[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 do

[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 be

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

2016-07-02 Thread Witold E Wolski
Breathed in his "Bloom County" comic strip ) > > > On Fri, Jul 1, 2016 at 7:40 AM, Witold E Wolski wrote: >> Hi William, >> >> I tested plyrs dlply function, and it seems to have have an O(N* >> log(R)) complexity (tested for R=N) so I do not know if N i

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 Wolski wrote: >

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 wrote: > On 29/06/16 21:16, Witold E Wolski wrote: >> >> It's the inverse prob

[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. How

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

2016-06-27 Thread Witold E Wolski
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, Witold E Wolski wrote: >> I ha

[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 ac

[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. I

[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 bes

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

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

[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 colo

[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 n

[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
/Embedded 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 > wrote: >>What is the access time for R lists given a name of list element, is it >>

[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 standard

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 wrote: > I am testing a package with > > R C

[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 simultaneous

[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 read.t

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 wrote: > I am using from within R-studio and the .Rmd file builds nicely. > > However, when I try to compile the f

[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

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

2015-08-03 Thread Witold E Wolski
if there are better solutions availabe in R. On 3 August 2015 at 15:13, Duncan Murdoch 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. > &

[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] sort order of a character sequence is different on windose and linux (linux result)

2014-07-08 Thread Witold E Wolski
ery impractical to use, with data which is avaiable today. On 6 July 2014 14:15, Duncan Murdoch 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 solu

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

2014-07-06 Thread Witold E Wolski
tml In summary, we support only C-locale. On 6 July 2014 13:33, Duncan Murdoch 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). &g

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... ___

[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_r

[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_DGFVA

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

2014-07-05 Thread Witold E Wolski
a frustrated R user. On 5 July 2014 02:18, Duncan Murdoch 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(!rowna

[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] 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 = > data.frame(merge(tt,msexp$pepinfo,by="transit

[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 https://stat.ethz.ch/mailman/listinfo

[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 below

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 wrote: > I

[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] Documenting docType data

2014-05-20 Thread Witold E Wolski
Thanks a lot. I still had an @export. On 20 May 2014 14:34, Hadley Wickham wrote: > Don't export the dataset? (as mentioned in the answer to that > question). If that doesn't help, please supply a minimal reproducible > example. > > Hadley > > On Tue, May 20, 2

[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 is

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

2014-05-16 Thread Witold E Wolski
em.time(f1()) >user system elapsed >3.500.003.53 > system.time(f1.c()) >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

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

2014-05-16 Thread Witold E Wolski
e the iteration is made in native code. On 16 May 2014 15:57, Jari Oksanen wrote: > Witold E Wolski gmail.com> writes: > >> >> Looking for an fast dist implementation >> where I could pass my own dist function to the "method" parameter >> >> i.

[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] 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

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

2014-05-14 Thread Witold E Wolski
idered *very* impolite. > > As this is a question for R-help only, i.e., not fit for > R-devel anyway : > > >>>>> Witold E Wolski > >>>>> on Wed, 14 May 2014 10:57:09 +0200 writes: > > > Have a class for which I would like to provid

[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 l

[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 sauc

[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)){ plot(d$ratio,-log10(d$pval

[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

[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.tab

[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 variable

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

2014-02-03 Thread Witold E Wolski
64488 > language R > version.string R Under development (unstable) (2013-12-19 r64488) > nickname Unsuffered Consequences > > Regards > Petr > > >> -Original Message- >> From: Witold E Wolski [mailto:wewol...@gmail.com] >> Sent: Monday, F

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

2014-02-03 Thread Witold E Wolski
2014 11:36, PIKAL Petr 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 Wolsk

[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 http://www.R-project.o

[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] 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, at=seq(0,1,l

[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 low

[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, ..

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 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

[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 https://sta

[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 = FALS

[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

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 wrote: >>>>>> Witold E Wolski >>>>>> on Tue, 6 Aug 2013 16:40:42 +0200 writes: > > > Does anyone also observes with R 3.1 (on

[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 https://stat.ethz.c

[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 <- heatmap.2(m

[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 h

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 wrote: > Would anyone of

[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 <- matrix(rnorm(100),

[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) -

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 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

[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 S

[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 https://stat

[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 http

[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 off-anti-dia

Re: [R] file.stem?

2013-07-15 Thread Witold E Wolski
$", "", bn) > } > file.stem("/the/path/to/afile.txt") > > > > 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 >

[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 https://sta

[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(x>breaks[i-1] & x <= breaks[i])] <- i } by(x,y,sum) but

[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 post

[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 mat

[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 give