similar to: lists as matrix cells ?

Displaying 20 results from an estimated 1000 matches similar to: "lists as matrix cells ?"

2005 Mar 21
1
working with tables
Hi, two questions - I think simple to solve for you ... (1) I've written a function containing some loops. Each loop will generate a few outputs. Finally I have to combine them to get something like a "spreadsheet" that my colleagues can import in EXCEL. Up to now I'm doing it as follows: With each loop-step I assign new values for each "column" of my desired output
2012 Apr 18
1
Re: validates_uniqueness_of question
Hi All, I am trying write a validation rule where I need to ensure that when a certain value is updated or created in a particular columns, a number of other columns columns are unique and that another column does not contain a certain value. I have been able to use the validates_uniqueness_of :column_a (to be updated or inserted) with , :scope => [ :column_b , :column_c , :column_d ]
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 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 );
2009 Mar 17
11
Refactoring module
Dear all Please see the following module, In module SX3 SX4 and SX5 have similar class Tasklist, but inherit from different class. I will use the following code to connect to different data sources RemoteSX3Model.establish_connection sx3_hash RemoteSX4Model.establish_connection sx4_hash RemoteSX5Model.establish_connection sx5_hash How can I refactor my code in module to look simpler? Thank you
2005 Jun 06
1
Interleave cells with IP over ATM?
Anyone know if it''s possible to interleave two IP packets when using PPPoA and VC based lines? Can it be done with any PPPoE implementations? The goal is to reduce the delay when you have a high priority packet waiting, but a lower priority (large) packet already started going out ahead of this packet. I don''t want the overhead of much smaller MTU, which is the other way
2010 Oct 05
0
10 Points How Cells Improves your Rails Architecture
What steps does it take to improve your architecture with Cells? This article [1] discusses the best practices from keeping views dumb, via slim controllers, how to avoid messy helpers, through to hiding your caching strategy and component-oriented teams. [1] http://nicksda.apotomo.de/2010/10/10-points-how-cells-improves-your-rails-architecture/ -- You received this message because you are
2007 Nov 29
0
empty cells in ftable
hello when I enter: ftable(xtabs(cnt~jeo+slp+pcurv+asp+hey),data=dt) it gives a frequncy table. But some cells are empty. like this: 19 2 72 0 3 68 0 4 99 0 5 110 0 6 97 0 7 74 0 8 46 0
2018 Jun 21
0
[PATCH v2 1/5] dt-bindings: virtio: Specify #iommu-cells value for a virtio-iommu
A virtio-mmio node may represent a virtio-iommu device. This is discovered by the virtio driver at probe time, but the DMA topology isn't discoverable and must be described by firmware. For DT the standard IOMMU description is used, as specified in bindings/iommu/iommu.txt and bindings/pci/pci-iommu.txt. Like many other IOMMUs, virtio-iommu distinguishes masters by their endpoint IDs, which
2018 Jun 26
0
[PATCH v2 1/5] dt-bindings: virtio: Specify #iommu-cells value for a virtio-iommu
On 25/06/18 20:27, Rob Herring wrote: > On Thu, Jun 21, 2018 at 08:06:51PM +0100, Jean-Philippe Brucker wrote: >> A virtio-mmio node may represent a virtio-iommu device. This is discovered >> by the virtio driver at probe time, but the DMA topology isn't >> discoverable and must be described by firmware. For DT the standard IOMMU >> description is used, as specified
2020 Jul 01
2
no/empty NUMA cells on domain XML
Hi , I'm looking for a possibility to simulate a VM (to be used as a host) reporting no or empty NUMA <cells> in 'virsh capabilities'. 'virsh capabilities' usually reports single NUMA in the VMs, like <numa> <cell id='0' cpus='0-63' memory='16777216' unit='KiB'/> </numa> I appreciate if someone could advise Thank you
2020 Jul 01
0
Re: no/empty NUMA cells on domain XML
On Wed, Jul 01, 2020 at 12:08:35PM +0300, Polina Agranat wrote: > Hi , > > I'm looking for a possibility to simulate a VM (to be used as a host) > reporting no or empty NUMA <cells> in 'virsh capabilities'. 'virsh > capabilities' usually reports single NUMA in the VMs, > like > <numa> > <cell id='0' cpus='0-63'
2002 Jul 11
0
lattice and crosstabs with empty cells
Suppose you have a dataframe with two factors, but not all the factor levels appear together. For instance: stuff<- structure(list(fac1 = structure(c(2, 1, 2, 2), .Label = c("down", "up"), class = "factor"), fac2 = structure(c(1, 2, 1, 2), .Label = c("left", "right"), class = "factor"), x = c(1, 1, 2, 2), y = c(1, 2, 2, 1)),
2005 Jun 08
1
RODBC question: problem importing series with blank cells
Hello, I have an excel file that I load through RODBC. Some of my columns are blank. They are equity time series and the stocks did not exist at the earlier dates. My problem is that the whole column becomes <NA> even though there are numbers at later dates. Here's my excel file http://www.tradebit.com/download.php/35699 <http://www.tradebit.com/download.php/35699> And
2006 Mar 22
1
calculate difference of consecutive cells in vector
Hi in dataframe I want to subtract the "next" value in the list from the former one to get this: name var1 output a 9 506 b 515 512 c 1027 453 so I subtract: table$var1[2]-table$var1[1] and write it into table$output[1] etc.. I did this with: for (i in 1:(length(table$var1)){ table$output[i] <- table$var1[i+1]-table$var1[i] } it works