similar to: multhist,labels and percentages

Displaying 20 results from an estimated 1000 matches similar to: "multhist,labels and percentages"

2012 Oct 23
2
barplot
Hi, I want to make a barplot with the following datasets: I have a file as following: name chr position A1 A2 pop1 pop1 pop2 pop2 I have calculated a measure using all the values in columns "pops", the values are saved in a vector. Now I want to make a barplot using the values in this vector as the y axis and the values in the column "position" in the x-axis. thank you
2008 May 26
1
X-Axis Problem with Multhist Plot
I am creating a side-by-side histogram using "multhist" of PLOTRIX. However, I can't seem to control the X-axis. It yields the following X points in the axis: 1 3 5 7 9 13 17 21 25 29 33 with uneven spacing between x-ticks (see attached file). Especially I want to create a bar for every x-axis (1,2,3,4...36), now not every x-axis has a bar. Is there a way to alter my following
2012 Feb 23
1
multhist weird behavior/ xlabels wrong
Hi, I found some weird behavior of the function multhist in the plotrix package and I would like to ask you about it: so, it works well to put two histograms next to each other, but I don't understand the breaks… so for example, library(plotrix) mh <- list(rnorm(200, mean=100, sd=10), rnorm(200, mean=100, sd=10)) multhist(mh) #produces a plot with
2012 Jan 04
3
[newbie] stack operations, or functions with side effects (or both)
summary: Specifically, how does one do stack/FIFO operations in R? Generally, how does one code functions with side effects in R? details: I have been a coder for years, mostly using C-like semantics (e.g., Java). I am now trying to become a scientist, and to use R, but I don't yet have the sense of "good R" and R idiom (i.e., expressions that are to R what (e.g.) the Schwartzian
2005 Jul 07
3
What method I should to use for these data?
Dear R user: I am studying the allele data of two populations. the following is the data: a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 pop1 0.0217 0.0000 0.0109 0.0435 0.0435 0.0000 0.0109 0.0543 0.1739 0.0761 0.1413 0.1522 0.1087 0.0870 0.0435 0.0217 0.0109 pop2 0.0213 0.0213 0.0000 0.0000 0.0000 0.0426 0.1702 0.2128 0.1596 0.1809 0.0957 0.0745 0.0106
2006 Feb 18
1
reshaping result of by()
Hello, I'm trying to build a frequency table for a vector, broken down by the combination of factors. For further analyses, I need to have the result arranged in a new data frame, with the upper limit of the histogram's breaks, the per bin count, and the factors identifying each record. My problem is including the latter: ---<---------------cut
2010 Sep 16
3
Help with customizing a histogram figure
Hi all, Please consider the following code: require(plotrix) l <- list(rnorm(50),rnorm(50,sd=2),rnorm(50,mean=3)) multhist(l) I have two things I need help with: (1) In the output, there are empty spaces on the x-axis. How would I eliminate these spaces? I want a nice, smooth, empty-spaceless x-axis. (2) How could I add tracing lines to each histogram? I am undoubtedly using the wrong
2012 Jul 01
1
significant difference between Gompertz hazard parameters?
Hello, all. I have co-opted a number of functions that can be used to plot the hazard/survival functions and associated density distribution for a Gompertz mortality model, given known parameters. The Gompertz hazard model has been shown to fit relatively well to the human adult lifespan. For example, if I wanted to plot the hazard (i.e., mortality) functions: pop1 <- function (t) {
2010 Jul 24
1
Doubt about a population competition function
Hi, I'm doing a function that describe two populations in competition. that's the function that i wrote: exclusao<-function(n10, n20, k1, k2, alfa, beta, t){ n1<-k1-(alfa*n20) n2<-k2-(beta*n10) if(t==0){plot(t, n10, type='b', xlim=range(c(1:t),c (1:t)), ylim=range(n10, n20), xlab='tempo', ylab='tamanho populacional') points(t, n20, type='b',
2003 Sep 04
1
Allelic Differentiation, sampling, unique(), duplicated()
Hi people, I have made some progress trying to work out how to solve this problem but I have got a bit stuck - sorry if this turns out to be a simple exercise . . Allelic Differentiation (AD) in genetics measures the number of different alleles between (say) two populations eg: Organisms in Pop 1 have alleles: a, b, c, d, e Organisms in Pop 2 have alleles: b, b, c, d, e Different
2012 Jan 28
3
logical subsetting, indexes and NAs
Dear All, just a quick example: > x = 1:25 > x[12] = NA > x [1] 1 2 3 4 5 6 7 8 9 10 11 NA 13 14 15 16 17 18 19 20 21 22 23 24 25 > y = x[x<10] > y [1] 1 2 3 4 5 6 7 8 9 NA Is there any way of NOT getting NA for y = x[x<10]? Similarly > y = x[x<15] > y [1] 1 2 3 4 5 6 7 8 9 10 11 NA 13 14 How do I get rid of the NA (not post
2005 Jun 20
3
vectorisation suggestion
Hi All, I am counting the number of occurrences of the terms listed in one vector in another vector. My code runs: for( i in 1:length(vector3)){ vector3[i] = sum(1*is.element(vector2, vector1[i])) } where vector1 = vector containing the terms whose occurrences I want to count vector2 = made up of a number of repetitions of all the elements of vector1 vector3 = a vector of NAs that is
2008 Feb 18
2
predicting memory usage
Hi All, is there a way of predicting memory usage? I need to build an array of 86000 by 2500 numbers (or I might create a list of 2 by 2500 arrays 43000 long). How much memory should I expect to use/need? Cheers, Fede -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44
2009 Nov 13
4
R, NIH and FDA
Dear All, I will soon be working with NIH and possibly FDA. Will I be able to use R or will I be forced to use SAS? Cheers, Federico -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com
2011 Jul 08
3
Making a new package: licence
HI All, I have written and succesfully uploaded a new package. The licence it is under is 'GPL' --no version. My assumption is, since all the code is written in R the licence R used for R would affect the code (hence my "GPL" stands for "whatever version of the GPL R is under") I am happy with the licencing I used, but I'd like to ask if there is any transitive
2009 Aug 04
1
fitted.values less than observed values
Hi All, I have some data where the dependent variable is a score, low (1:3) or high (8:9), and the independent variables are 21 genotypic markers. I'm fitting a logistic regression on the whole dataset after transforming the score to 0/1 and normal linear regression on the high and low subsets. I all cases I have a numer of cases of data 'duplications', i.e. different
2006 Mar 19
1
Extracting numerical vectors from an array - use of multhist (plotrix)
Dear R community members, I am very new to R, so I hope I didn´t oversee the answer to my question in the manuals and faqs. I am trying to create a histogram containing several data sets (I would like to see how the dependent variable is distributed for the different groups). This should be possible using the function multhist contained in the plotrix package. (I am using R 2.2.1, in windows XP).
2007 Nov 26
4
writing summary() to a text file
Hi All, I would like to output the results of a function into a text file, legible as a such. The function produces a summary quite like: summary(lm(x ~ y + w * z)) [for instance] and I am not clear how to save this summary into a text file 'automagically', because I need to be able to do it in a for() loop. Cheers, Federico -- Federico C. F. Calboli Department of Epidemiology
2011 Dec 05
2
barplot ignoring col parameter
Hi All, I'm having a problem with barplot: mydata [1,] 2 108 0 0 0 1 3 0 0 0 0 0 7 18 3 4 8 20 26 20 19 7 1 1 mycol = c(rep('yellow', 2), rep('white', 3), rep('orange',2), rep('white', 5), rep('orange',3), rep('red',9)) barplot(mydata, col = mycol) gives me an uniformly yellow barplot. How do I solve this? bw Federico
2009 Jun 17
3
tiff() woes
Hello all, a friend has a problem with tiff() which I was unable to help about. I searched the error messages to no avail. When he tries: tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = 5, height = 5, units = "cm", bg = "white", res = 1200) Error in tiff(filename = "FedeWhyDoesntThisBloodyWork.tif", width = 5, : unable to start device