similar to: Subarrays

Displaying 20 results from an estimated 90 matches similar to: "Subarrays"

2013 Jan 28
2
R plot like candlestick
Hi all, I'm new on this list so I greet all. My question is: does exist in R a plot similar to candlestick plot but not based on xts (time series)? I have to plot a range of 4 value: for every item I have min value, max value and 2 intermediate values. I would like plot this like a candlestick, i.e. with a box between 2 intermediate values and 1 segment between box and min value and a segment
2007 Jun 14
1
R programming question
Dear All., I've created R-code for which a user will be asked to choose between 2 analyses. I've written one function for each type of analysis. Within each function, the users is prompted to enter information. An example is: cat("Enter value for lower Linf :\n") L1<-scan(n=1) cat("Enter value for upper Linf :\n") L2<-scan(n=1)
2010 May 30
1
Calling fft from C
Hi I have made a R function 'convolve2' for convolution of two real valued vectors based on Rs 'convolve' with option type="open" - see below. (exp.length and irf.length are variables set in another part of the program) I wish to implement the function convolve2 in C and use it in a function used from R with .Call - e.g. I need to call fft in C. All I can find in the
2008 Mar 12
3
Types of quadrature
Dear R-users I would like to integrate something like \int_k^\infty (1 - F(x)) dx, where F(.) is a cumulative distribution function. As mentioned in the "integrate" help-page: integrate(dnorm,0,20000) ## fails on many systems. This does not happen for an adaptive Simpson or Lobatto quadrature (cf. Matlab). Even though I am hardly familiar with numerical integration the implementation
2010 Mar 23
1
Changing content of column in data.frame + efficient join extraction between 2 data.frames
Dear R users, I have 2 SpatialPointsDataFrame's, pcs and East. The column str_1 in the first (pcs) is: > pcs[0:4,] coordinates cat str_1 int_1 int_2 dbl_1 dbl_2 1 (101000, 263000) 1 "SM06B" 101000 263000 4.978915 -4.293668 2 (101000, 265000) 2 "SM06C" 101000 265000 4.960478 -4.266742 3 (101000, 267000) 3 "SM06D" 101000 267000
2006 Oct 19
2
arraytake for extracting subarrays from multidimensional arrays
Hi, I recently encountered a problem with array subsetting and came up with a fix. Given an array of arbitrary dimensions, in which the number of dimensions is only known at runtime, I wanted to extract a subarray. The main issue with doing this is that in order to extract a subarray from an array of (say) 4 dimensions you usually specify something like this a.subarray <- a[,c(4,2),1:5,]
2006 Nov 01
2
installing rgl package on linux suse 10.1
Dear R wizards, In windows I get really cool graphs with the rgl package. However on linux, it seems that I can't install one of my favourite packages. I get a error message on X11, but all X11 packages are installed on my linux desktop. Who can help me out here? Thanks! Steven Gorl? >install.packages() * Installing *source* package 'rgl' ... checking for gcc... gcc checking
2010 Dec 16
1
Subarray specification problem
Hi. I'm new to R, and I'm still learning R's system for addressing subsets of data structures. I'm particularly interested in the problem of selecting subarrays based on complex criteria involving the dimnames (as opposed to the values of the cells) of the array. Here's an example of such a problem. Suppose I have an array x of unknown dimensions (it may have been passed as
2005 Dec 19
0
Guide - install Rcmdr and JGR on (SUSE) Linux
Hi! I have made a guide describing how to install Rcmdr and JGR on SUSE 10.0. Here it is: http://www.hellmund.dk/RSUSEGUI.html If you have installed R on SUSE with the package found on CRAN - and all the packages on my list was present at the time of installation of R - it might not be necessary to install R from source - give me some feedback on this, please! I might extend the guide to
2011 Oct 20
1
R code Error : Hybrid Censored Weibull Distribution
Dear Sir/madam, I'm getting a problem with a R-code which calculate Fisher Information Matrix for Hybrid Censored Weibull Distribution. My problem is that: when I take weibull(scale=1,shape=2) { i.e shape>1} I got my desired result but when I take weibull(scale=1,shape=0.5) { i.e shape<1} it gives error : Error in integrate(int2, lower = 0, upper = t) : the integral is probably
2003 Nov 21
0
AW: best editor for .R files
Hi The best is definitively (X)Emacs (my opinion). For Windows have a look at (GNU Emacs): http://www.math.auc.dk/~dethlef/Tips/introduction.html And for XEmacs with Cygwin (XEmacs, Latex, ..., for Ess simple save (require 'ess-site) in your init.el): http://home.imf.au.dk/hellmund/indhold.html For native Xemacs for Windows: www.xemacs.org Xemacs is easy to install, use and configure
2008 Jun 18
1
subarray
Hello everyone, I am trying to subset a matrix with the following code: dat<-read.table(file="C:\\Documents and Settings\\Owner\\My Documents\\Yeast\\Yeast.txt",header=T,row.names=1) file.show(file="C:\\Documents and Settings\\Owner\\My Documents\\Yeast\\Yeast.txt") Z.matrix<-as.matrix(dat) Y<-array(dat,dim(,[46:63]) but I keep getting the error message: error in dim
2014 Nov 24
0
Error "promise already under evaluation ..."
> The above question still stands, but otherwise, I overlooked the most > obvious solution: > > dim_1 <- function(x) dim(x) > > Unit: nanoseconds > expr min lq mean median uq max neval cld > dim(x) 0 1 72.941 1 1 2696 1000 a > base::dim(x) 11549 13474 15105.950 14245 15399 60824
2007 Nov 24
1
ragged array with append
I wonder what's the right way in R to do the following -- placing objects of the same kind together in subarrays of varying length. Here's what I mean: > word <- c("a","b","c","d","e","f","g","h","i","j") > kind <- c(1,1,1,2,3,4,5,5,7,7) > d <-
2004 Aug 23
3
idea for "virtual matrix/array" class
I've been wondering how to work with more data than can fit in memory, in a way that allows it to be worked with conveniently and quickly. Of course, a database can be used for this purpose, but extracting data from a database is much slower and somewhat less convenient than extracting data from a native object (at least in our setup). One idea I was thinking about was to have a new
2010 Mar 18
2
how to take multiple subsets from a matrix
useR's I have a matrix from which I want to take multiple subsets from, according to a particular scheme I will now describe. The matrix below (mat) is 5x5, and I want to take 9 subsets of it, each of dimension 3x3. The best way to explain what the result should look like is with the following: > dat <- c(3,6,1,9,12,9,2,10,6,5,3,13,1,4,8,9,4,6,10,11,2,7,3,5,10) > miss <-
2006 Aug 11
2
Array#chunk method, maybe someone will find this useful
class Array # break an array up into <size> chunks def chunk(size=1) return self if self.empty? raise ArgumentError if !size.kind_of? Integer y = self.length.divmod(size) rows = (y[1] > 0) ? y[0] + 1 : y[0] arr = Array.new(rows) (0...rows).each do |i| arr[i] = self.slice(size*i, size) end (arr.last.length...size).each { |i| arr.last[i] = nil }
2014 Nov 24
1
Error "promise already under evaluation ..." with function(x, dim=dim(x))
On Sat, Nov 15, 2014 at 1:47 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > > On 14/11/2014, 9:06 PM, Henrik Bengtsson wrote: > > I've meant to ask the following for several years now. I understand why: > > > >> foo <- function(x, dim=dim) { dim } > >> foo(1) > > Error in foo(1) : > > promise already under evaluation:
2009 Feb 01
1
[LLVMdev] Aliasing (was Performance vs other VMs)
On Sunday 01 February 2009 05:25:40 Ramón García wrote: > This is not a quite fair comparison. Other virtual machines must be > doing garbage collection, while LLVM, as it is using C code, it is > taking advantage of memory allocation by hand. That is an insignificant advantage in this particular case (SciMark2) because the memory for each test is preallocated and not part of the
2009 Feb 01
0
[LLVMdev] Performance vs other VMs
This is not a quite fair comparison. Other virtual machines must be doing garbage collection, while LLVM, as it is using C code, it is taking advantage of memory allocation by hand. On Fri, Jan 30, 2009 at 9:56 PM, Jon Harrop <jon at ffconsultancy.com> wrote: > > The release of a new code generator in Mono 2.2 prompted me to benchmark the > performance of various VMs using the