similar to: frequency of labels in a barplot

Displaying 20 results from an estimated 400 matches similar to: "frequency of labels in a barplot"

2008 Jul 09
4
Find the closest value in a list or matrix
I have a long list of numbers [3.4,5.4,3.67,....], and I basically want to find the index of the number closest to this number that I have, let's say 5.43. How would I do this without writing a for loop (I have to do this many times for several lists)? Is there a "lookup" function in R? Thanks! -- View this message in context:
2008 Jul 02
2
Accessing a field in a data fram
raw <- read.csv(file=filename, head=TRUE,sep=",") I've read in a csv file, and I'm looking to access a column whose name is held in a string. For example, I want to access raw$one or raw$two, but this will depending on the string. Let's say that the string is decision<-"one". How would I access raw$one? The following doesn't work:
2008 Jul 22
2
Plotting Multiple lines on one plot
Hi, I'm trying to plot multiple lines on one plot. I have a data frame raw, and i want to plot raw$date on the x-axis and raw$theta, raw$vega, raw$delta, and a few others on the y-axis, with a legend. However, I'm not sure what the scale of those data sets are, and I don't know which one will have the largest scale. How can I plot this? I've tried ggplot (qplot), but it
2009 Sep 11
2
Graph visualization
Hello, I am working with graph and adjacency matrix, the package 'graph' seems to be appropriate for this. An example in the package > mat <- rbind(c(0, 0, 1, 1), + c(0, 0, 1, 1), + c(1, 1, 0, 1), + c(1, 1, 1, 0)) > rownames(mat) <- colnames(mat) <- letters[1:4] > graph1 <- new("graphAM", adjMat=mat) > graph1 A
2008 Jan 30
2
Concatenate xyplots
Dear R-community, I created 5 different xyplots and graphed all of them with the print command on one page (e.g. print(graph1, split=c(1,1,1,5), more = T) ... print(graph5, split=c(1,5,1,5), more =T) Using the above commands separates each graph by a white space. However, since the graphs do share the same x-axis, I was wondering if there is a way to concatenate graph1 through 5 so
2003 May 21
2
Graphics device history recording problem (Previous and Next utilities)
I use 1.7.0 version under Windows XP. Problem: When graphics device history recording function turned on, suppose I source a file containing lines: plot(graph1) plot(graph2) I see the graph2 in the graphic device, assuming graph2 is the last plot in the file. Now using "Previous" under history menu, I get graph1 as expected. But after that, using "Next" does not show graph2.
2012 Nov 08
2
How to include CI in a grouped barplot?
Hello everyone! I need to include the confidence interval bar in a grouped barplot. I've found some options on the web, but none of them solved my problem. The question is: my barplot was created using vectors for each pair of bar and them combining them using cbind. I mean: a=c(10,15) b=c(20,24) c=c(21,23) ... hei=cbind(a,b,c) graph1=barplot(hei, beside=T,...) I've tried to include
2009 Jan 12
1
Problem between panel.abline and log scales (lattice)
Hello and Happy New Year to all R-Users !!! I would like to plot a lattice graph with a logarthmic y axis and add two reference lines that is : ref<-c(0.0070, 0.0096) graph1<-xyplot(data$y1 ~ as.numeric(strptime(data$x1, format="%Y-%m-%d %H:%M:%S")) | as.character(data$Code), list(y = list(log = T)), xlab="X'", ylab="Y", panel = function(...) {
2013 Jun 19
2
knitr without R studio
Hello folks, I`m using knitr on R studio, which make it easy to use, but a coworker of mine would like to run it on "simple" R. So I was wondering if you know what is the equivalent of the button "knit HTML" in RStudio in R. I tried knit2HTML( <html> <head> <title></title> </head> <body style="background-color:white">
2009 Aug 25
1
Clogit or LRM?
Hello I believe that I'm getting very close in my modeling application. I've come across a challenge that I am unable to solve and would really appreciate the group's opinion. I've been using the val.prob function from the Design library (Thanks Frank!!) to both evaluate and visualize my model. From the scores and graph, it appears as my model is very accurate in
2006 Aug 24
1
help: trouble using lines()
Hi R experts, I have been using ReML as follows... model<-lmer(late.growth~mtf+year+treat+hatch.day+hatch.day:year+hatch.day:treat+ mtf:treat+ treat:year+ year:treat:mtf+(1|fybrood), data = A) then I wanted to plot the results of the three way interaction using lines() as follows... tmp<-as.vector(fixef(model)) graph1<-plot(mtf,fitted(f2), xlab=list("Brood Size"),
2010 Nov 19
1
How to print "graph1.png" "graph2.png" "graph3.png" ... ?
Dear All, I want to print out "graph1.png" "graph2.png" "graph3.png" ... How can I print it out? Thank you,
2011 Jul 12
4
qplot and for loops
I have 4 columns and 56 rows of made up data that I want to plot as a series of bar graphs. The idea is to create one bar graph for each of the 4 columns using a for loop. I tried the following command in RStudio and when I type x in the console I get just the 4th graph instead of all four graphs. I did not define what x is before hand. I was not sure what it would be. Any suggestions on how you
2004 Apr 03
2
a fix for rotated PDF graphs
Hi, I have found references for the following problem in the list archives, but no nice solution. So I decided to post one I came up with. The problem is that graphs output as eps files, for example using ps.options(onefile=FALSE, paper="special", width=8, height=8, horizontal=FALSE, pointsize=12) get rotated when I convert them to pdf using epstopdf. Both ghostview and
2012 Apr 26
1
Sweave: Avoiding recompilation of figures
Hello everybody out there using Sweave, There are some complicated SQL queries and laborous calculations against large data included as R code chunks using Sweave in my LaTeX document. These code chunks create graphs that do not change most of the time, but they are of course recompiled every time I run Sweave on my file for update of minor changes to the LaTeX text. Is there an option
2002 Oct 13
2
HOW to resize existing graphics window??
Sorry for newbie question, but i havent find the way to resize existing graphics window from r console. Of course, i can do it by dragging window borders and i can set up size of the device (window) if i call windows(width,height) but is it really impossible to resize existing window?? how i can do this? i am using R 1.6.0 on Microsoft Windows 2000 OS Thanks for your help
2007 Jul 17
2
Combine R2HTML and Rcmd BATCH?
Hi All, I have an R script that spawns output in the form of an HTML page. This is done by the R2HTML package. Now I want to run the same script using Rcmd BATCH. However, it seems that it is not possible to use R2HTML in this case. My script ends with this error message: ######################### Error in dev.print(png, file = AbsGraphFileName, width = Width, height = Height, : can only
2007 Sep 27
3
testing the contents of an environment
Suppose I want to delete everything in my working directory that is not a function. It seems that sapply(ls(),is.function) always returns FALSE, because ls() returns objects of mode character. How do I evaluate is.function(), not on a character string, but on the object that character string represents? Thanks, Tim
2010 May 06
2
Problem with nested functions - functions nested too deeply in source code
Hi all! I¹m just implementing the Ullmann¹s algorithm for searching subgraph isomorphisms in graphNEL objects. The algorithm is running with smaller graphs, but when I¹m calling it i get an R error message saying that functions are nested too deeply in source code. I found out that the problem is in the so called refinement procedure of the algorithm which consists of 10 different functions,
2008 Jul 03
1
Exporting a Graph that has lines()
I'm trying to export a graph (any form is good). I'm trying to export one that uses plot() then lines(). however, it seems that the jpeg format and the pdf format only takes the first line plot, and doesn't even consider the additional plots. My code is the following: output_file<-paste(filez,".pdf",sep="") pdf(output_file) plot((x_data) ~ (y_data), main =