similar to: how to get empty sequence for certain bounds

Displaying 20 results from an estimated 8000 matches similar to: "how to get empty sequence for certain bounds"

2005 Jul 22
1
sequence()
Hi Function sequence() repeatedly concatenates its output, and this is slow. It is possible to improve on the performance of sequence by defining myseq <- function(x){unlist(sapply(x,function(i){1:i}))} The following session compares the performance of myseq(), and sequence(), at least on my G5: > identical(sequence(1:50),myseq(1:50)) [1] TRUE > system.time(ignore <-
2005 Jul 22
1
sequence()
Hi Function sequence() repeatedly concatenates its output, and this is slow. It is possible to improve on the performance of sequence by defining myseq <- function(x){unlist(sapply(x,function(i){1:i}))} The following session compares the performance of myseq(), and sequence(), at least on my G5: > identical(sequence(1:50),myseq(1:50)) [1] TRUE > system.time(ignore <-
2003 Apr 23
1
Setting up Xemacs + Sweave
Dear list, I have tried to setup my Xemacs for use with Sweave, which I indend to learn. I have followed the instructions in the Sweave FAQ, that is to say, I put (defun Rnw-mode () (require 'ess-noweb) (noweb-mode) (if (fboundp 'R-mode) (setq noweb-default-code-mode 'R-mode))) (add-to-list 'auto-mode-alist '("\\.Rnw\\'" . Rnw-mode)) (add-to-list
2003 Oct 01
3
fitting Markov chains
I need to find a computationally simple process for the movement of interest rates. In this simplified model, an interest rate can have 3--5 possible values, and its movement is characterized by a matrix of transition probabilities (ie, it is a Markov process). I would like to estimate this process from a given set of data. For example, let the interest rate time series be: 7 3 8 2 5 9 6
2004 Apr 10
4
(offtopic) I need two sets of 5 different color scales
Hi, I am plotting a policy function (result from a dynamic stochastic optimization problem, discretized approximation). The policy function maps from an 2 x 2 x 2 x 3 x B x F state space to a B x F state space (B and F are usually between 4-6, and represent domestic and foreign savings. The other variables are income (Y), inflation (Pi), domestic and foreign interest rates (R and Z)). I
2004 Apr 27
5
parsing a data file
Hi, I need to parse a data file (output of a measuring device) of the following format: BEGIN RECORD [first record data] RECORD [second record data] RECORD [third record data] END Line breaks can (and do ;-() occur anywhere. White space behaves very much like TeX, eg it is not important whether there are one or more spaces or linebreaks as long as there is one of them. It is a text file, not
2003 Apr 17
1
Testing for whole numbers
Is there a way in R to test if a given number is an integer, ie a whole number? I am not referring to the data type of a number, but to its value. That is to say, is.whole(pi-pi+2) would be TRUE, whereas is.whole(4/3) would be false. At the moment I am using is.whole <- function(a) { floor(a)==a } which is OK for real numbers, but not for complex ones (a+bi would be a whole number if both a
2004 Mar 31
2
array addition doesn't recycle!
Hi, I have noticed the following: > a <- array(1:4, c(2, 2)) > A <- array(1:4, c(2,2,2)) > A + a Error in A + a : non-conformable arrays It works with a matrix + a vector, why doesn't it work with arrays? Am I missing something? How would you do the above operation efficiently (ie I need to add a matrix to each "plane" of 3-dim array)? At the moment I am using
2003 Jul 12
2
using cut on matrices
Dear list, I'd like to use the function cut() on matrices, ie that when I apply it to a matrix, it would return a matrix of the same dimensions instead of a vector. I wonder if there is a better (more elegant) solution than matrix(cut(a, ...), ncol=ncol(a), nrow=nrow(a)) because I would like to use cut on both vectors and matrices and avoid testing whether a is a matrix. Thanks, Tamas
2011 Jul 04
1
Ubuntu version
hi! http://download.gluster.com/pub/gluster/glusterfs/3.2/3.2.1/Ubuntu/glusterfs_3.2.1-1_amd64.deb Which version of Ubuntu was it built for? Maybe it can be used for any version of it? Are the build script available for download? Thank you, tamas
2004 Apr 25
7
R vs Matlab: which is more "programmer friendly"?
Hi, The department of economics at our university (Budapest) is planning a course on numerical methods in economics. They are trying to decide which software to use for that, and I would like to advocate R. The other alternative is Matlab. I have found comparisons in terms of computational time for matrix algebra, but I don't think that is relevant: the bottleneck for economists is usually
2004 Apr 26
1
need settings for the listings package
Hi, I am typesetting R code in TeX using the listings package. I have experimented with various settings for the text, but all look a bit ugly. This might be because I have no typographic experience ;-) I would really appreciate if people sent me the settings they use for the listings package (eg in the \usepackage line, or \lstset, I am thinking about choices for basicstyle, ... etc). I
2004 Jul 05
1
general questions about R on debian/powerpc
Hi, I am about to but a laptop, and have narrowed the choices down to a Dell Latitude 600 and an Apple Powerbook G4 Aluminium (Princeton provides these models at a discount for grad students). I am biased towards the Powerbook, and would like to run Debian on it. I have only used debian on i386 platforms so far. I use R quite frequently, so I would be interested in your experience of running R
2003 Oct 06
1
visualizing transition probability matrices
Dear List, I have a couple of (~200) 3x3 transition probability matrices (ie each defines a Markov chain). They are all estimated from the same underlying process, so it ie meaningful to take their elemetwise mean and standard deviation. [1] First question: supposing that they are given in a list l, how do I get their elementwise mean and standard deviation? Fortunately, the mean of trans. prob.
2003 Apr 30
2
Working comfortably with (X)Emacs + Sweave
Dear List, I am trying to become more familiar with Sweave at the moment, beacuse I am convinced that it will eventually make my life easier. However, I have not found anything relevant in the mail archives about the following problem. Both the article in R-News and the Sweave FAQ suggest that Emacs would be a great development environment for working with Sweave. So far, it doesn't seem to
2011 Apr 20
4
dict quota problem
hi! In table I see this: | papp.tamas at center.hu | 118671994 | 20437 | du -sm says, the size of the maildir is 154M. I use xfs. I can't figure out, why is there a difference. Can you help me out? Thank you, tamas
2015 Oct 07
2
bug report: dovecot-imapd core dump
Hi, could not find it -- back to the list, maybe someone can suggest a fix/workaround. Best, Tamas On Wed, Oct 07 2015, Dominik Breu wrote: > Hello, > > yeah this one looks familiar to me can you search the list back in > september there was a somewhat similar bug with thunderbird imho timo > posted a notice about it. > > greetings, > > dominik > > Am
2006 Nov 19
2
good practice for values not provided
Hi, I am writing a collection of functions which I plan to share as a package later (when they are tested thoroughly), so I would like to do things "right" from the beginning... I encountered a minor question of style. Consider a function f <- function(a,b,x=NULL) { ## ... } if !is.null(x), f will use x to calculate the result, but if is.null(x), it will do something else not
2004 Apr 02
2
"(de)linearizing" array indices
Hi, I have a dynamic programming problem with many state variables, let's call them l, n, m, etc. The transition probabilities are originally given in an array form, eg transtition[l,m,n,ll,mm,nn] give the probability of going from l,m,n to ll,mm,nn. However, the numerical solution is best handled when I "flatten" the L x M x N state space into a single one (call it S), ie a
2009 Dec 21
5
Thinderbird+delete+move to Trash folder
hi All, I have a problem, which makes me headache. I can't find out, what is the problem. I have a mail szerver, which works just fine as expected, TB move messages to trash folder after I delete it, and they are moved. I have an other server. If I delete a message, it doesn't move to the Trash folder. As deleted_to_trash plugin is installed, if I only mark messages as deleted, they