similar to: How can we creat conditional data frame

Displaying 20 results from an estimated 10000 matches similar to: "How can we creat conditional data frame"

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 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
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
2006 Apr 18
4
ISDN in Japan?
Hi all, general query here --- I'm about to set up an asterisk box for use in Japan but can't figureout if it's all ISDN there or what? I have gathered so far that the two major providers, NTT and KVH both offer ISDN lines with .......INS1500 and maybe INS64 protocols? Not sure... But I'm seeing stuff about J1 vs. T1/E1 .... so does that mean I can't use a Digium card it
2007 May 14
6
Conditional Sums for Index creation
Hi, Apologies for the long mail. I have a data.frame with columns of price/mcap data for a portfolio of stocks, and the date. To get the total value of the portfolio on a daily basis, I calculate rowSums of the data.frame. > set.seed(1) > ab <- matrix(round(runif(100)*100),nrow=20,ncol=5) > ab[1:5,4:5] <- NA > ab[6:10,5] <- NA > ac <- as.data.frame(ifelse(ab <=
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 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
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
2011 Apr 09
5
Yearly aggregates and matrices
Hi, I need to perform calculations on subsets of a data frame: DF = data.frame(read.table(textConnection(" A B C D E F 1 a 1995 0 4 1 2 a 1997 1 1 3 3 b 1995 3 7 0 4 b 1996 1 2 3 5 b 1997 1 2 3 6 b 1998 6 0 0 7 b 1999 3 7 0 8 c 1997 1 2 3 9 c 1998 1 2 3 10 c 1999 6 0 0 11 d 1999 3 7 0 12 e 1995 1 2 3 13 e 1998 1 2 3 14 e 1999 6
2005 Mar 25
4
Openloop disconnect?
Hello there, I tried to found documentation about openloop disconnect on Asterisk/Zaptel. And up to now, I didn't find anything. Is openloop disconnect supported by zaptel/wcfxo drivers? Other question: maxsilence and silencethreshold don't seem to have any effect on voicemail. Could it be possible that in certain situation it just wont work? I tried adding some verbose in
2008 Feb 22
2
Corrected : Efficient writing of calculation involving each element of 2 data frames
Hi I have 2 data.frames each of the same number of rows (approximately 30000 or more entries). They also have the same number of columns, lets say 2. One column has the date, the other column has a double precision number. Let the column names be V1, V2. Now I want to calculate the correlation of the 2 sets of data, for the last 100 days for every day available in the data.frames. My code looks
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 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,
2000 Sep 24
2
Folding ?
Hi, I need to write a function that would look something like this: S <- function(b=betas){ expression(b[1] * f(b[2] * x * f(b[3] * x * f(...b[n-1] * x * f(b[n] * x)))...) } Where n is the number of element in b. Further I need to be able to evaluate S at some x numerically of course and I need to use "deriv" and produce dS/dx such that I can evaluate it also at some x. I
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
2011 Sep 12
5
completing missing samples
Hello, I have a time-series that has some missing samples. I was thinking on completing them using either zero-order hold or linear interpolation. I am looking for an efiicient way (other than a loop...) of identifiying the missing time slots and filling them. Can you think of any methods that might help here? (obviously which(diff(time)>min(diff(time))) will give the locations, but what
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
2007 Jun 04
1
Help with conditional lagging of data
Dear Friends, I have some data with three columns named ID, Year and Measure X. I need to create a column which gives me a lag for each ID (note not a continous lag), but a lag conditional on the id and the given year. Please find below a sample of the data Input file sample ID Year X AB12 2000 100 AB12 2001 120 AB12 2002 140 AB12 2003 80 BL14 2000 180 BL14
2005 Dec 15
1
bug?
> library(foreign) > da<-read.dta(file.choose()) > da startdat starttim enddate endtime days hoursmin secused 1 2005-01-11 2 2005-12-15 20.19 NA NA 9 > attributes(da) $datalabel [1] "Example of use of date and time functions" $time.stamp [1] "15 伿伄伓侢佋伮 2005 20" $names [1] "startdat" "starttim"