search for: hallab

Displaying 10 results from an estimated 10 matches for "hallab".

Did you mean: hallar
2012 Dec 04
3
How to find matching columns in a matrix of lists?
Dear R users, I have a matrix composed of lists: m <- matrix( list(), nrow=1, ncol=3 ) m[[ 1, 1 ]] <- list("A", "B") m[[ 1, 2 ]] <- list("A", "C") m[[ 1, 3 ]] <- list("A", "B") and want to get the sub-matrix where cells contain "B". But m[ , "B" %in% m[ 1, ], drop=F ] as well as m[ , "B"
2013 Feb 13
2
Is there a place to put executable R scripts in new packages?
Dear R users, writing an R package I wonder, if there is a place to put executable R scripts into. So that when the package is installed one can use the script from the command line. Say we have e new package called FunkyR and wanted to deliver with it an executable called FunkyCold.R, so that from the command line, one could do the following: Rscript FunkyCold.R argument_1 argument_2 Any
2012 Dec 11
2
debug on lapply
Dear R experts, recently I tried to debug a R function with an internal lapply call. When debugging I seem not to be able to use the "n" command to debug the inner function called by lapply. How could I achieve this? *For example:* test <- function( ) { lapply( 1:3, function( x ) x + 1 ) } debug( test ) *Start debug:* > test() debugging in: test() debug bei #1:{
2013 Apr 02
3
How to do platform independent system calls?
Dear R experts, I hope everyone has had a happy easter break. Recently my work included writing R function that need to call external tools. I did this using R's system function for example: system( paste( 'tool', '-input', path_to_input, '-output', path_to_output, '-other_switch', some_val ) ) I have two question about this: 1) Is there a way to implement
2012 Dec 13
1
possible bug in function 'mclapply' of package parallel
Dear parallel users and developers, I might have encountered a bug in the function 'mclapply' of package 'parallel'. I construct a matrix using the same input data and code with a single difference: Once I use mclapply and the other time lapply. Shockingly the result is NOT the same. To evaluate please unpack the attached archive and execute Rscript mclapply_test.R I put the
2012 Nov 21
1
lists as matrix cells ?
Dear R experts, since more or less half a year I am using R. In many of my computations I construct huge matrices. Often I do so using 'cbind' on named lists: do.call( 'cbind', list( "Column_A"=list("Row_one"=1.0, "Row_two"=2.0, "Row_three"=3.0), "Column_B"=list("Row_one"=4.0, "Row_two"=5.0,
2012 Dec 17
2
Why does matrix selection behave differently when using which?
Dear R community, I have a medium sized matrix stored in variable "t" and a simple function " countRows" (see below) to count the number of rows in which a selected column "C" matches a given value. If I count all rows matching all pairwise distinct values in the column "C" and sum these counts up, I get the number or rows of "t". If I delete the
2013 May 24
0
Rcpp with OpenMP - Need example Makevars
Dear R experts, recently I started developing a Rcpp package "OpenMPTest". Within that package I want to use OpenMP, as in the following code example: // header file #include <omp.h> using namespace Rcpp ; RcppExport SEXP testOpenMP( SEXP nThreads ) ; // cpp file SEXP testOpenMP( SEXP nThreads ) { BEGIN_RCPP NumericVector numberThreads = NumericVector( nThreads );
2013 May 03
0
Is it a "Headless problem"? - Same code runs well in interactive R shell, but never terminates with Rscript
Dear R-Experts, I seem to be dealing with a so called "headless" problem in R. I wrote a quite extensive program that generates a Bayesian network from a query protein's Phylogenetic Tree and subsequently uses a message passing algorithm to infer the most likely annotation for the query leaf in the tree using the other leaves known -and proven- protein function annotations. The
2012 Dec 28
0
How to apply XPath query on XML nodes separately?
Dear R experts, I try to extract certain child nodes from an XML document and construct a table in which the parent node names are the columns and the child id values, joined in a list, are the cell content. If I first apply an XPath query to extract all above parent nodes, then iterate over those nodes and again apply a XPath query to select their child nodes, I get *ALL* matching child nodes