similar to: average for files and graph

Displaying 20 results from an estimated 9000 matches similar to: "average for files and graph"

2009 Dec 16
2
Flexclust barchart issue when mcol=NULL (PR#14150)
Full_Name: Chris Hane Version: 2.10.1 OS: Windows Submission from: (NULL) (198.203.181.181) When using barchart in the flexcust package, setting mcol=NULL to avoid the lollipops causes an error. Each panel shows the text message "Error using packet n replacement has length zero." where n is the panel number. > data(iris) > cl <- cclust(iris[,-5], k=3) > barplot(cl,
2006 Dec 01
3
Make many barplot into one plot
Dear all, ## I have 4 tables like this: satu <- array(c(5,15,20,68,29,54,84,119), dim=c(2,4), dimnames=list(c("Negative", "Positive"), c("Black", "Brown", "Red", "Blond"))) dua <- array(c(50,105,30,8,29,25,84,9), dim=c(2,4), dimnames=list(c("Negative", "Positive"),
2010 Oct 29
2
make many barplot into one plot
Dear R users I would like to group my barplot graph (see example on the R help link). The proposed R code, adding individual bars to the plot, looks really overwhelming. My specific dataset just consists of five groups and three different levels within each groups (the individual bars). The .txt file is read as matrix (horizontal: group, vertical: levels). The R trellis barchart (function
2013 Apr 10
3
how to calculate average of each column
Hey All, I have a large dataset and I want to calculate the average of each column then return a new dataset. Here is my question: I dont know if there is a function that can allow me to calculate the average every 60 records of data in the whole dataset, and return a new data frame. Not sure if I have to divide the dataset first for every 60, then do the mean or can i directly do that. thanks
2003 May 13
2
Barchart to make a graph like this??
Hi list, I'm trying to get R to make a graph like the one shown in this pdf, where males are white bars and females are black bars. http://www.brrc.unr.edu/~knussear/mmgraph.pdf I tried barchart, but I couldnt get the bars to share a common x axis. Do you have any suggestions? Thanks for your help Ken
2013 Feb 21
1
remove rows in data frame by average
Dear all, I have a data frame, which looks like this: Subject | Block | Trial | Feature1 | Feature2 .... 1 | 1 | 1 | ... | ... 1 | 1 | 2 | ... | ... 1 | 2 | 1 | ... | ... 1 | 2 | 2 | ... | ... 1 | 3 | 1 | ... | ... ...| ...| ...| ... | ... Can I remove the "Trial" column by averaging all the rows and without using a "for loop"? At the end my data frame should look like
2009 Jun 15
3
Aligning axis values when plotting more than one graph on same axes
Dear R Users, I am trying to plot a barchart with a line graph superimposed (using par(new=TRUE)). There are 12 bars and 12 corresponding points for the line graph. This is fine, except that I'm encountering two problems: 1) The position of the points (of the line graph) are not centred on the middle (horizontally) of each corresponding bar. In fact, whilst the first point is located on the
2013 Jan 17
2
How to calculate monthly average from daily files in R?
I have 365 binary files: https://echange-fichiers.inra.fr/get?k=oy3CN1yV1Um7ouRWm2U ,I want to calculate the monthly average. So from the 365 files, I will get 12 files.I would like also to tell R not to take into account the no-data value (-32765).for example, for the first month, there are 31 records: 3 of these records has the value -32765,I want R to take the average of the rest records(28
2011 May 15
1
pls help: lattice graph with both negative and positive value, x and y cross at 0 and negative value bars are plotted just oppositive direction in contrast to positive
Dear R experts: Here is my problem: #Data 1 Y <- c(0.5, 0.1, 0.5, 1.3, 1.4, 1.6, 1.65, 2.4, 2.6, 3.4, 3.6, 4.3, 4.42, 4.8, 4.7, 3.4, 3.3, 2.8, 2.8, 1.2, 1.1, 0.5, 0.2, 0.1, -0.2, -1.5, -2.5, -1.3, -0.5, -0.1) X <- seq(1:30) X1 <- c(rep("T1", 24), rep("T2", 6)) dat1 <- data.frame(Y, X, X1) require(lattice) mcol <- c("green", "red")
2007 Nov 21
2
matrix elementwise average with NA's
Hello fellow R users, I have a matrix computation that I imagine should be relatively easy to do, however I cannot figure out a nice way to do it. I have two matrices, for example mat1 <- matrix(c(1:5,rep(NA,5), 6:10), nrow=3, byrow=T) mat2 <- matrix(c(2:6, 6:10, rep(NA,5)), nrow=3, byrow=T) I'd like to compute the element-wise average for non-NA entries. Of course (mat1+mat2)/2
2008 Jun 13
1
Switching the order of legend boxes in a lattice bar graph
I suspect there is a simple solution to this problem, but have been unable to find it. Below is some code that I have run to create 3 lattice graphs. I have been asked to change the legend so that the 'No' and dark blue are above "Y" and light blue in the legend to mirror the stacked bars in the graph which feature dark blue above light blue. I have tried changing the data
2006 Aug 16
3
separate row averages for different parts of an array
I have an array with 44800 columns and 24 rows I would like to compute the row average for the array 100 columns at a time, so I would like to end up with an array of 24 rows x 448 columns. I have tried using apply(dataset, 1, function(x) mean(x[])), but I am not sure how to get it to take the average 100 columns at a time. Any ideas would be welcomed. thanks, Spencer [[alternative HTML
2010 Apr 07
1
finding weekly average...
Hi All, I have a time series data with two continuous variables (say Var1 and Var2) for 4 years (***not continuous, do have some breaks because of missing data***). Something like this: Date Var1 Var2 12/01/2004 7 0 12/01/2004 0 0 12/01/2004 0 7 12/01/2004 7 0 12/01/2004 0 7 12/01/2004 0 7 12/02/2004 0 0 ... I need to find out weekly average of var1 and var2, so that I end up with data like:
2008 Sep 24
2
Graph question
If I have a set of data comprising a list of numbers of eggs on mosquito guts that range from 1 to 157. How can I get R to draw a barchart of the distribution of the data (i.e. x axis= number of eggs on a gut, y axis=number of mosquitoes found with that number of eggs)? Data is listed below. Thanks, Georgina Number of eggs on each mosquito gut: [1] 1 1 1 1 4 2 1 12 12 1 2
2007 Apr 25
1
barchart producing incorrect number of barcharts when columns renamed
Hi everybody, I'm having problems with the barchart command in the lattice package. I'm creating barcharts from matrices with with anything from 20 to 71 columns. When I leave the column names alone, that is they are set in the read.table command (and inherited by subsequent commands) the correct number barcharts is created by the "print(barchart(...))" command.
2007 May 07
2
graphing with barchart question
I am graphing data using barchart (barchart(DV ~ IV | subject). I have 2 groups of 9 subjects each. How can I easily identify which group each subject belongs to? I have been trying to color code them, but can't seem to get that to work. Any suggestions would be appreciated. Thanks, Matt Bridgman
2011 Nov 21
1
Lattice graph help
Hi all I hope you might help me with some aspects of producing a graph in lattice. There are three things I have struggling with and that is: 1. to separate the horizontal box rows from each other; 2. to change the colour of the horizontal and vertical strips to white; and 3. to place the axes labels on the left y axes and on the bottom x axes. I would really appreciate some help. I have put the
2011 Dec 19
1
block averaging data frames
Hi there, This seems like it should be simple. I have a data frame of climate data sampled every 10 min. I want to average the entire data frame into 30 min values (i.e., one value for each half hour). Functions like running.mean give me a moving average but I want to reduce the size of the entire frame.. Any ideas how? Cheers! Example of my data timestamp Voltage LwTempDownelling
2010 Aug 11
2
Sweeping a zoo series
Given a long zoo matrix, the goal is to "sweep" out a statistic from the entire length of the sequences. longzoomatrix<-zoo(matrix(rnorm(720),ncol=6),as.yearmon(outer(1900,seq(0,length=120)/12,"+"))) cnames<-c(12345,23456,34567,45678,56789,67890) colnames(longzoomatrix)<-cnames longzoomatrix[1:24,] 12345 23456 34567 45678
2009 Jul 29
3
how to skip a numeric column for averaging other columns?
Data has the first row for variable name and the first column for sample name. I want to take "Log" for all data, but how to compute without the first column for sample name. That is, column 1: sample ID column 2-10: data I want to find an average on each column (2-10) > apply(raw_data,2,mean) Error in Math.data.frame(list(sample_id = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, :