similar to: rle

Displaying 20 results from an estimated 200 matches similar to: "rle"

2001 Apr 03
1
rle() fails with NA's (PR#892)
Full_Name: Jeff Hallman Version: 1.2.2 OS: Solaris Submission from: (NULL) (132.200.32.33) > rle(c(1, NA, 1) $lengths [1] 3 $values [1] 1 should be as in Splus: $lengths [1] 1 1 1 $values [1] 1 NA 1 The Splus implementation (which works fine in R) is: rle <- function(x){ if(!is.atomic(x)) stop("Argument must have an atomic mode") if(length(x) == 0)
2011 Sep 28
0
Rle function to expand for many samples
Dear R experts, code: >m<-read.table("test.txt",sep='\t',header=TRUE,colClasses=c('character','integer','integer','rep('numeric',150)) > s<-data.frame(c(rle(m$Sample1)[[2]],rle(m$Sample2)[[2]],rle(m$Sample3)[[2]]),c(rle(m$Sample1)[[1]],rle(m$Sample2)[[1]],rle(m$Sample3)[[1]])) > names(s)=c("Values","Probes")
2011 Oct 31
2
rle for non concecutive
Dear all, I would like to task you if you know a rle version that can work also in a non consecutive way too. B.R Alex [[alternative HTML version deleted]]
2012 Aug 01
0
how to use function of rle approx ifelse etc. in data frame
Hello R help, I have this data frame M2[160000,5] with NAs, a simple example would be: set.seed(1234) M2<-expand.grid(ID=182:183, year=2012, month=1:3, day=1:3, KEEP.OUT.ATTRS=FALSE) M2 <- M2[with(M2, order(ID, year, month, day)),] #sort the data M2$value <- sample(c(NA, rnorm(100)), nrow(M2), prob=c(0.5, rep(0.5/100, 100)), replace=TRUE) M2: ID year month day
2020 Aug 26
1
NAs and rle
Hi All, A twitter user, Mike fc (@coolbutuseless) mentioned today that he was surprised that repeated NAs weren't treated as a run by the rle function. Now I know why they are not. NAs represent values which could be the same or different from eachother if they were known, so from a purely conceptual standpoint there is no way to tell whether they are the same and thus constitute a run or
2012 Oct 16
2
cannot coerce class '"rle"' into a data.frame
why? > rle Run Length Encoding lengths: int [1:1650061] 2 2 8 2 4 5 6 3 26 46 ... values : chr [1:1650061] "4bbf9e94cbceb70c BG bg" "4fbbf2c67e0fb867 SK sk" ... > as.data.frame(rle) Error in as.data.frame.default(vertices.rle) : cannot coerce class '"rle"' into a data.frame it seems that rle.df <-
2006 May 03
11
Curse words
Hello, I just had a problem with someone cusing on my rail app now is there somthing like Red Cloth that I can use to disable ''dirty words'' -- Posted via http://www.ruby-forum.com/.
2012 Jun 08
2
help with rle function on paired data
Dear R Community - I hope you might be able to provide some guidance regarding the use of the rle function. I have a set of time-series data where a measured value is recorded every 30 seconds after the start of an experiment. Many of the measured values repeat and I am interested only in the values when there is a change. If I turn the measured values into a vector, the rle function works
2013 Mar 26
2
Feed rle() output to hist()
I want to make a histogram from the lengths vector which is part of the output of rle. But I don't know how to access that vector so that I use it as an argument of hist(). What argument must I use so that I use the lengths vector as an input to hist()? Example output is: Run Length Encoding lengths: int [1:4] 1 2 3 3 values : num [1:4] -1 1 -1 1 A printout of the function rle() may
2011 Jun 17
3
rle on large data . . . without a for loop!
I think need to do something like this: dat<-data.frame(state=sample(id=rep(1:5,each=200),1:3, 1000, replace=T,prob=c(0.7,0.05,0.25)),V1=runif(1,10,1000),V2=rnorm(1000)) rle.dat<-rle(dat$state) temp<-1 out<-data.frame(id=1:length(rle.dat$length)) for(i in 1:length(rle.dat$length)){ temp2<-temp+rle.dat$length[[i]] out$V1[i]<-mean(dat$V1[temp:temp2])
2011 Sep 26
1
How to Store the executed values in a dataframe & rle function
Hi group, This is how my test file looks like: Chr start end sample1 sample2 chr2 9896633 9896683 0 0 chr2 9896639 9896690 0 0 chr2 14314039 14314098 0 -0.35 chr2 14404467 14404502 0 -0.35 chr2 14421718 14421777 -0.43 -0.35 chr2 16031710 16031769 -0.43 -0.35 chr2 16036178 16036237 -0.43 -0.35 chr2 16048665 16048724 -0.43 -0.35 chr2 37491676 37491735 0 0 chr2 37702947 37703009 0 0
2009 Feb 18
1
ggplot2 Y axis labels
Hi all: Using the example below, is there a way to add Y axis titles to each graphic instead of sharing the same title? library(ggplot2) RT = matrix(c(814, 500, 424, 394, 967, 574, 472, 446),4,2) colnames(RT) = c('repetition','alternation') rownames(RT) = c('7-yrs','11-yrs','15-yrs','21-yrs') rt <- melt(RT) names(rt) <- c("age",
2017 Nov 15
10
Re: [Qemu-devel] [qemu-img] support for XVA
2017-11-15 21:29 GMT+01:00 Richard W.M. Jones <rjones@redhat.com>: > Gandalf, is there an XVA file publically available (pref. not > too big) that we can look at? I can try to provide one, but it's simple: # tar tvf 20160630_124823_aa72_.xva.gz | head -n 50 ---------- 0/0 42353 1970-01-01 01:00 ova.xml ---------- 0/0 1048576 1970-01-01 01:00 Ref:175/00000000
2011 Jun 23
3
problem (and solution) to rle on vector with NA values
Hello there R-help, I'm not sure if this should be posted here - so apologies if this is the case. I've found a problem while using rle and am proposing a solution to the issue. Description: I ran into a niggle with rle today when working with vectors with NA values (using R 2.31.0 on Windows 7 x64). It transpires that a run of NA values is not encoded in the same way as a run of other
2023 Feb 13
2
An interesting chat with ChatGPT
Duncan - Indeed, this has now been well documented; I have called these constructions "Schr?dinger Facts", since they arise from a superposition of truths in the training data that collapse into an untruth when observed. https://sentientsyllabus.substack.com/p/chatgpts-achilles-heel Now, the curious question is: why can it program. Why is its production of R-syntax less vulnerable
2006 Feb 09
2
Two sources on one PC
Hi guys, there is a solution to connect two sources (radio) on one PC with two audio-cards? I use winXP with OddcastV3 Thanks Luigi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/icecast/attachments/20060209/cec10f27/attachment.html
2023 Feb 13
1
An interesting chat with ChatGPT
I was wondering which anchor would match in the regular expression "(a)|(b)" if both "a" and "b" matches the target string. What appears to happen is that the first match wins, and that's how it is documented in Python, but I was looking for docs on this in R. As far as I can see, the ?regex help page doesn't resolve this. So just for fun, I decided to
2011 Jul 26
2
Plotting problems directional or rose plots
Hi, I'm trying to get a plot that looks somewhat like the attached image (sketched in word). I think I need somthing called a rose diagram? but I can't get it to do what I want. I'm happy to use any library. Essentially, I want a circle with degree slices every 10 degrees with 0 at the top representing north, and 'tick marks' around the outside in 10 degree increments to
2017 Nov 15
4
Re: [Qemu-devel] [qemu-img] support for XVA
I'm thinking on how to prove you a sample XVA I have to create (and populate) a VM because an empty image will result in an empty XVA And a VM is 300-400Mb as minimum Il 15 nov 2017 10:30 PM, "Max Reitz" <mreitz@redhat.com> ha scritto: > On 2017-11-15 21:41, Gandalf Corvotempesta wrote: > > 2017-11-15 21:29 GMT+01:00 Richard W.M. Jones <rjones@redhat.com>: >
2017 Nov 15
2
Re: [Qemu-devel] [qemu-img] support for XVA
On 2017-11-15 21:24, Richard W.M. Jones wrote: > On Wed, Nov 15, 2017 at 09:07:12PM +0100, Max Reitz wrote: >> On 2017-11-15 21:06, Gandalf Corvotempesta wrote: >>> 2017-11-15 20:59 GMT+01:00 Max Reitz <mreitz@redhat.com>: >>>> Well, you can't just add support to qemu-img alone either. Every image >>>> format supported by qemu-img is one