similar to: Folding ?

Displaying 20 results from an estimated 500 matches similar to: "Folding ?"

1999 Nov 03
3
bug in Rdconvlib.pl converting to latex (PR#311)
If .../<pkg>/man/ contains a filename beginning with [, such as [.datetimes, Rdconvlib.pl cannot convert that help file into latex at INSTALL time. [Using --no-latex is a workaround.] The error given is: # R INSTALL ssCatalogues : help >>> Building/Updating help pages for package `ssCatalogues' Formats: text html latex example /^[.datetimes$/: unmatched [] in regexp at
2003 Oct 09
1
An artifact of base being namespace
Function in the base library of R 1.8.0 seems to use a search path with base coming before the local environment. I think this is intentional and is related to base being a namespace. > log <- function(x, base) 200 > log(1) [1] 200 > log10 function (x) log(x, 10) <environment: namespace:base> > log10(1) [1] 0 > This is most problematic when you are creating a
2011 Dec 12
1
Detecting typo in function argument
With some chagrin after spending a couple of hours trying to debug a script, I realized I had typed in something like ans<-optimx(start, myfn, mygr, lower<-lo, upper=up) that is, the "<-" rather than "=". The outcome on my machine was a non-obvious error several layers deep in the call stack. For info, optim() seems to stop much more quickly. The error is
2004 Jul 03
4
counting the occurrences of vectors
Hi: I have two matrices, A and B, where A is n x k, and B is m x k, where n >> m >> k. Is there a computationally fast way to count the number of times each row (a k-vector) of B occurs in A? Thanks for any suggestions. Best, Ravi. [[alternative HTML version deleted]]
2010 Dec 15
3
Applying function to a TABLE and also "apply, tapply, sapply etc"
Dear R-help forum members, Suppose I have a data-frame having two variables and single data for each of them, as described below. variable_1           variable_2         10                          20 I have written a function, say, 'fun' which uses input 10 and 20 and gives me desired result. fun = function(X, Y)          {          X + Y              #( I am just giving an example of
2000 Feb 02
1
Large data sets and aggregation
I've noticed quite a few messages relating to large data sets bedeviling R users, and having just had to program my way through one that actually caused a "Bus error" when I tried to read it in, I'd like to ask two questions. 1) Are there any facilities for aggregation of data in R? ( I admit that this will not do much for the large data set problem immediately) 2) Is there any
2012 Aug 04
3
Head or Tails game
Hi, Reading about a "Heads and Tails" game in http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/amsbook.mac.pdf Introduction to Probability (Example 1.4, pp. 5-8). You toss a coin 40 times. If heads, Peter wins $1, tails, he loses $1. I think I can do that ok with: winnings <- sum(sample(c(-1,1), 40, replace=TRUE)) But I have to do it 10,000 times
2012 Nov 22
2
BibTeX entries in CITATION file
Dear List, While trying to define a customised CITATION file for a package, following R-exts, I realised that if I use only one 'citEntry' I got both a text description and a BibTex entry for the package, as for the 'nlme' package: -------------------------- citation('nlme') To cite package 'nlme' in publications use: Jose Pinheiro, Douglas Bates, Saikat
2008 Apr 04
4
How can we creat conditional data frame
Hi, R experts. I am a new user of R and trying to learn this program. I have a problem. Here is the code. d<-as.Date(c("2000/01/03","2000/01/05","2000/01/19","2000/01/28")) r<-rnorm(4) da<-data.frame(d,r) a<-as.Date("01/01/2000","%d/%m/%Y") b<-as.Date("30/01/2000","%d/%m/%Y") ab<-seq(a,b,by=1)
2010 Jun 29
1
Performance enhancement for ave
library(plyr) n<-100000 grp1<-sample(1:750, n, replace=T) grp2<-sample(1:750, n, replace=T) d<-data.frame(x=rnorm(n), y=rnorm(n), grp1=grp1, grp2=grp2) system.time({ d$avx1 <- ave(d$x, list(d$grp1, d$grp2)) d$avy1 <- ave(d$y, list(d$grp1, d$grp2)) }) # user system elapsed # 39.300 0.279 40.809 system.time({ d$avx2 <- ave(d$x, interaction(d$grp1, d$grp2, drop =
2002 May 08
1
Questions about S4 style methods and generics
I have some questions about S4 style methods and generics. First of all, is there any way of using default values for arguments in the generics/methods? My own experiments show that such arguments are always ignored. The green book seems to be silent on this matter. The second question is about using a non-trivial function body for generics. Page 351 of the green book gives an example of this
2008 Nov 22
1
Need some help in R programming code
Dear R guru, I am Saikat Sarkar working as a researcher of Economics in Tampere University, Finland. I am trying to estimate some Garch related tests with Bayesian analysis by R programme. I am not good in R but trying to survive. Anyway I have the coding but not working properly. I have tried to find the problem but failed. I am writing to all R gurus to help me out. Could you please look at
2004 Jul 01
3
list structure question
Hi, I have a list in which element is a vector (all of the same length and all numeric). I want to find the mean of the first elements of the vectors, the mean of the second elements of the vectors and so on. Currently I convert the list to a data.frame and apply rowMeans(). But is there a way to to do this directly on the list? I seem to recall a post in which there was such a function (or
2001 Mar 21
1
Is there any help for "Cannot allocate vector size of xxx KB"
Forgive me if this isn't relevant, but: are you stripping off the output you need (e.g., parameter estimates) and throwing away what you don't (e.g., residuals)? Reid Huntsinger -----Original Message----- From: Saikat DebRoy [mailto:saikat at stat.wisc.edu] Sent: Wednesday, March 21, 2001 12:15 PM To: Han Lai Cc: R-help Subject: Re: [R] Is there any help for "Cannot allocate vector
2008 Aug 27
5
Integrate a 1-variable function with 1 parameter (Jose L. Romero)
Hey fellas: I would like to integrate the following function: integrand <- function (x,t) { exp(-2*t)*(2*t)^x/(10*factorial(x)) } with respect to the t variable, from 0 to 10. The variable x here works as a parameter: I would like to integrate the said function for each value of x in 0,1,..,44. I have tried Vectorize to no avail. Thanks in advance, jose romero
2008 Jan 03
2
confidence interval too small in nlme?
Hello, I am interested in using nlme to model repeated measurements, but I don't seem to get good CIs. With the code below I tried to generate data sets according to the model given by equations (1.4) and (1.5) on pages 7 and 8 of Pinheiro and Bates 2000 (having chosen values for beta, sigma.b and sigma similar to those estimated in the text). For each data set I used lme() to fit a model,
2008 Apr 06
3
how to manupute data frame with conditions fill cell with previous value if next cell is zero
Dear R Experts, This is the 2nd time in the chat room. Its a great place to get help from R experts. I have a data frame problem, it contains thousands of data. part of it, I am giving for explaining the problem date day x y z 82 1989-04-28 Fri 2118.0 2418.80 33713 83 1989-05-01 Mon 0.0 2414.96 33793 84 1989-05-02 Tue 2103.1 2402.86 33955
2008 Nov 24
1
FW: read.ssd
Did not seem to reach Saikat DebRoy, this might be the forum. Bendix -----Original Message----- From: BXC (Bendix Carstensen) Sent: 24. november 2008 15:00 To: 'saikat at stat.wisc.edu'; 'stvjc at channing.harvard.edu' Subject: read.ssd It's always annoyed me that that read.ssd crashed on datasets with long variable names, but the other day a collegue of mine pointed out to
2005 Mar 17
1
"RMySQL for R 2.0.1"
Dear List, RMySQL is old and wouldn't install on R 2.0.1. How should the source be rewritten to be accepted by R 2.0.1. With thanks Fredrik Lundgren
2004 Dec 16
8
counting numbers without replicates in a vector
Hi, I am just wondering if there is an easy way to count in a numeric vector how many numbers don't have replicates. For example, a=c(1,1,2,2,3,4,5), how can I know there are three numbers (3, 4 and 5) without replicates? Thank you! Jun =====