similar to: Histogram problem

Displaying 20 results from an estimated 2000 matches similar to: "Histogram problem"

2010 Oct 04
1
Splitting a DF into rows according to a column
Hi, I'm turning my wheels on this and keep coming around to the same wrong solution - please have a look and give a hand ... The premise is: a DF like so > loremIpsum <- "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque leo ipsum, ultricies scelerisque volutpat non, volutpat et nulla. Curabitur consequat ullamcorper tellus id imperdiet. Duis semper malesuada
2013 Jun 18
1
hist function in a for loop
Dear all, I need to create a for-loop in which I can compute multiple histograms My code is the following : #singlefile includes huge csv file #I want to specify the binsize #I would like to compute in the for -loop the histograms numfiles <- length(singlefile) for (i in 1 :51) { binsize <- -20 :20/2 hist(singlefile(singlefile$GVC[singlefile$new_id==i]], break=seq(),
2017 Aug 28
5
"Improvement with the R code"
Hello, I am trying to implement a formula aij= transition from state S_i to S_j/no of transition at state S_i Code I have written is working with three state {1,2,3 }, but if the number of states become={1,2,3,4,......n} then the code will not work, so can some help me with this. For and some rows of my data frame look like
2017 Aug 28
0
"Improvement with the R code"
Hi, I think you overthought this one a little bit, I don't know if this is the kind of code you are expecting but I came up with something like that: generate_transition_matrix <- function(data, n_states) { #To be sure I imagine you should check n_states is right at this point transitions <- matrix(0, n_states, n_states) #we could improve a little bit here because at
2008 Dec 08
3
Transforming a string to a variable's name? help me newbie...
Dear all, I'm a newbie in R. I have a 45x2x2x8 design. A dataframe stores the metadata of trials. And each trial has its own data file: I used "read.table" to import every trial into R as a dataframe (variable). Now I dynamically ask R to retrieve trials that fit certain selection criteria, so I use "subset", e.g. tmptrialinfo <- subset(trialinfo, (Subject==24 &
2009 Mar 18
3
[LLVMdev] Status of LLVM's atomic intrinsics
Having implemented a GC for HLVM, I am now turning my attention to implementing a GC that supports parallelism. To do this, I would like to use atomic instructions as well as mutexes. What is the status of LLVM's atomic instrinsics (e.g. CAS)? Is anyone using them in real projects? I realised that an obvious test would be to compile some simple example programs with llvm-g++ instead of
2001 Mar 16
1
combine dataset
Hi, I have two data sets look like below: ========================== state count1 percent1 CA 19 0.34 TX 22 0.35 FL 11 0.24 OR 34 0.42 GA 52 0.62 MN 12 0.17 NC 19 0.34 state count2 percent2 FL 22 0.35 MN 22 0.35 CA 11 0.24 TX 52 0.62 ========================== How to combine these two data set and make it look like below?
2009 Oct 29
1
operation with if/else on a dataframe
Hi to all, I have this dataframe (I show the first six rows) >head(table) A R Fold.Change P.Value Count1 Count2 1 ENSRNOE00000000002_at 0 1.13 0.60 1 1 2 ENSRNOE00000000009_at 0 -1.04 0.73 3 3 3 ENSRNOE00000000020_at 0 -1.08
2002 Jun 18
3
FINDNEXT problem, w2k and linux smbfs
I have inconsistent directory listing on share mounted on linux from windows 2k. Some time not all files appear in the directory listing. If reading directory listing multiple times (60-200 times) files listed originally would have one or two files missing in one of consecutive lists. The same problem appear as well if you are making backup of Windows files from multiple directories, there are
2012 Jul 11
3
Subset based on multiple values
I'm stuck on a seemingly simple problem. I'm trying to subset the data by several numbers and it cuts out half of the rows. Here is the sample code: test <- as.matrix(c(1,1,1,1,3,3,7,7,7,7)) Count <- tapply(test[,1], test[,1], length) # count for each value spp <- unique(test[,1]) Count1 <- as.data.frame(cbind(Count,spp)) Max <- max(Count) Count1$sppMax <-
2009 Sep 19
2
Counting observations of a combined factor
#I have a dataset with two factor. I want to combine those factors into a single factor and count the number of data values for each new factor. The following gives a comparable dataframe: a <- rep(c("a", "b"), c(6,6)) b <- rep(c("c", "d"), c(6,6)) df <- data.frame(f1=a, f2=b, d=rnorm(12)) df # I use the 'interaction' function to combine
2012 Mar 16
1
Identifying a change in events between bins
Hi there, First off, despite this being my first post here, I have scanned the R help forums a lot in the past few months to help with some questions, so a big thank you to the community as a whole for being so helpful! I'm somewhat of an R newbie, and have run up against a problem that I can't seem to solve. If anyone is able to help I would really appreciate it! I'm looking at a
2004 Jul 07
1
Histograms, density, and relative frequencies
R-users, I have been using R for about 1 year, and I have run across a couple of graphics problem that I am not quite sure how to address. I have read up on the email threads regarding the differences between density and relative frequencies (count/sum(count) on the R list, and I am hoping that someone could provide me with some advice/comments concerning my approach. I will admit
2008 Apr 16
3
memory issues
Hi all, I've read the R for windows FAQ and am a little confused re: memory.limit and memory.size to start using R 2.6.2 on WinXP, 2GB RAM, I have the command line "sdi --max-mem-size=2047M" Once the Rgui is open, memory.limit() returns 2047, memory.size() returns 11.315, and memory.size(max=T) returns 19.615 Shouldn't memory.size(max=T) return 2047? Upon running several
2002 Sep 06
3
Histogram Ranking
Hello, This is not exactly an R question, but I suspect that there is an R procedure that does what I am calling (for lack of a better name) "histogram ranking". I'm trying to evaluate a set of regression features by segregating by target class and comparing the feature histograms. My idea is that if the histograms are the same for two different classes then there is no
2010 Jun 28
2
Stacked Histogram, multiple lines for dates of news stories?
Dear colleagues, I have extracted the dates of several news stories from a newspaper data base to chart coverage trends of an issue over time. They are in a data frame that looks just like one generated by the reproducible code below. I can already generate a histogram of the dates with various intervals (months, quarters, weeks years) using hist.Date. However, there are two other
2017 Aug 28
0
"Improvement with the R code"
Ok, I assumed you wanted to compute a matrix M for all states such that M[i][j]= transition from state i to state j / number of transition from state i but from what you just answered it looks like you want to compute a matrix M for a set of states S such that: M[S_i][S_j]= transition from state S_i to state S_j / number of transition from state S_i where S_i is in the set S ? 2017-08-28
2009 Mar 18
0
[LLVMdev] Status of LLVM's atomic intrinsics
Jon Harrop wrote: > Having implemented a GC for HLVM, I am now turning my attention to > implementing a GC that supports parallelism. To do this, I would like to use > atomic instructions as well as mutexes. What is the status of LLVM's atomic > instrinsics (e.g. CAS)? Is anyone using them in real projects? > > I realised that an obvious test would be to compile some
2007 Oct 19
0
calculating power of log rank test
hie Im trying to calculate the power of the logrank test for different values of rho .I was just wandering whether the following programme would do it. any suggestions are welcome s=50 number=1 count1=0;count2=0;count3=0;count4=0;count5=0;count6=0;count7=0;count7=0; count8=0;count9=0 while(s!=0){ n=20 n1=n/2
2017 Aug 28
0
"Improvement with the R code"
Chuck (Is it fine to call you Chuck?) has far more R jutsu than I do obviously. I don't know much about pmin and factor but it might worth looking into if you want to manipulate states by names (I assume this is why one might want to use it?) generate_transition_matrix <- function(data, states) prop.table(table(head(data, -1), tail(data, -1)), 1)[states,]