Displaying 20 results from an estimated 5000 matches similar to: "ylim for graphic"
2005 Aug 24
2
Remove NAs from Barplot
Dear List:
I'm creating a series of barplots using Sweave that must assume a
standard format. This is student achievement data and the x-axis must
include all grades 3 to 8. In some cases, the data for a grade (or more
than one grade) are missing in the vector math.bar, but are never
missing for the vector apmxpmeet. The following sample code illustrates
the issue.
Using the code below to
2006 May 15
1
Trying to get values to display on horizontal barchart
Hello,
R 2.3.0
Windows XP
I have spent quite a bit of time trying to resolve my problem below, which included a R site search.
The "vertical bars" syntax below produces a vertical bar chart with the values displayed above each bar. I want to cast this graphic horizontally, but I have not been able to arrive at a suitable outcome. The best I have been able to do, using the second block
2007 Oct 30
1
Sweave line length
Hello,
I am trying to add R code to my dissertation and the length of a line
of text that Sweave generates is longer than the right margin in my
dissertation. I have found no way to tell Sweave how to set the line
length. I am using an iMac with tiger ver. 10.4.10, and R: ver.
2.5.1. Here is the R code that is longer than my right margin:
input to Sweave:
2012 Apr 20
1
Ternaryplot as an inset graph
Hello
I am trying to add a ternary plot as a corner inset graph to a larger
main ternary plot. I have successfully used add.scatter in the past for
different kinds of plots but It doesn't seem to work for this particular
function. It overlays the old plot rather than plotting as an inset.
Here is a simple version of what I'm trying. Note that if I change the
inset plot to be an ordinary
2006 Nov 22
2
problems with garchFit
Hi all,
I post it on both r-help and r-finance since I don't know where is most
appropriate for this topic. Sorry if it bothers you.
I did garch fitting on S&P500 monthly returns with garchFit from fSeries. I
got same coefficients from all cond.dist except normal. I thought that is
probabaly usual for the data. But when I play with it, I got another
question.
I plot skew normal with
2005 Jul 24
1
Question about 'text'
Dan,
Another tweak !
If you want the 'legend' to look pretty you can resize it by adding,say,
'cex=0.6' into the legend code; try---
legend("topleft", #inset=-1,
legend = do.call("expression", L),
bg='white',
ncol = 2,
pch=c('','','',':',':',':'),
x.intersp = 0.4,
2006 Mar 10
2
Plot.date and legends
Hi:
I'm trying to plot dates on the x-axis of a code, but the legend is not being
displayed. I receive the following error:
Error in match.arg(x, c("bottomright", "bottom", "bottomleft", "left", :
'arg' should be one of bottomright, bottom, bottomleft, left,
topleft, top, topright, right, center
In addition: Warning message:
longer
2004 Nov 28
1
Modifications to an abline
Dear List:
I am working to generate graphs for individual students that will be created through a series of loops in Sweave. Before doing so, I am still trying to design the graph. The code for creating the barplot is below with some sample datapoints just made up for now.
Ultimately, this chart will take data from an lme object using longitudinal student data. So, the dots represent the
2004 Dec 02
3
Wishlist: simple legend options (PR#7400)
Full_Name: Elizabeth Purdom
Version: 1.9.1
OS: Windows XP
Submission from: (NULL) (171.64.102.199)
It would be nice if legend had the option of some default locations you could
choose instead of entering specific coordinates, like "topleft",
"topright","topcenter", etc. based on par("usr") coordinates. I know I've wanted
it so often I've made my
2012 Aug 13
1
Fine Tuning Country Map
Dear All,
Please see the short script at the end of the email, which I assembled
looking for bits and pieces on the web.
It essentially does what I need: it plots several countries as a
color-coded map.
I just would like to fine-tune a bit the final image, in particular
(1) Select my own colors for "painting" the countries (i.e. associate
manually a color to every level)
(2) Be
2010 Apr 30
1
read.csv and blank character in object name of my data.frame
Dear group,
Here is my data frame:
position100415 <-
structure(list(DESCRIPTION = structure(1:9, .Label = c(" SUGAR NO.11 Jul/10
",
" SUGAR NO.11 May/10 ", "CORN May/10 ", "COTTON NO.2 Jul/10 ",
"CRUDE OIL miNY May/10 ", "ROBUSTA COFFEE (10) Jul/10 ", "SILVER May/10 ",
"SOYBEANS Jul/10 ", "WHEAT May/10
2006 Apr 14
2
spot the error (I can''t, I''m new)
I have a form that I want to use to update multiple
objects. In the controller,
@grades = Grade.find(params[:grade].keys)
@grades.each_with_index do |grade, i|
grade.update_attribute(params[:grade][i])
end
all_valid = @grades.inject(true) {|memo, c|
c.valid? && memo }
this doesn''t update the attributes as I would expect.
(I would just use
2004 Aug 01
3
Creating dummy codes
Is there an efficient way to create a series of dummy codes from a single variable? For example, I have a variable, “grade” = {2, …, 12}. I want to create k-1 dummy codes for grade such that grade 2 is the base (i.e, grade 2 =0).
I am hoping that the new variables can be labeled as grade.3, grade.4 etc. I'll then use
grade <- paste("grade.", 3:12, sep="") in
2004 Nov 28
1
paste command
In a previous post, I mentioned a loop being used to generate graphs. I have some sample code partially put together but have found one offending line of code that I cannot figure out what to do with.
I have one data frame called grade4. If I do something like
hist(grade4$math)
I get the appropriate chart.
Within the loop, however, I am doing this for multiple files and grades, so I use
2010 Feb 28
3
Change the scale on a barplot's y axis
I have grades data. I read them from a csv in letter-grade format. I
then converted them to levels
levels(grades$grade)=c('A+','A','A-','B+','B','B-','C+','C','C-','D+','D','D-')
And then to numbers
grades$gp=grades$grade
levels(grades$gp)=c(4.3,4.0,3.7, 3.3,3.0,2.7, 2.3,2.0,1.7, 1.3,1.0,0.7)
2010 Apr 15
1
sum rows in a data.frame...solution
Found this solution. It is maybe not the most elegant way, but it does the
job.
> a=as.data.frame(substr(lme$DESCRIPTION,1,14))
> colnames(a)=c("DESCRIPTION")
> lme=as.data.frame(c(a,lme[,2:3]))
> lme
DESCRIPTION CLOSING.PRICE POSITION
1 PRIMARY NICKEL 25,755.7100 0
2 PRIMARY NICKEL 25,760.8600 0
3 PRM HGH GD ALU 2,415.9000 0
2009 Apr 11
1
Error in R CMD check 2.8.1
Env: R 2.8.1, Win Xp, Eclipse/StatET
In a .Rd file, I have an example containing the lines:
# calculate Y M, using polynomial contrasts
trends <- as.matrix(VocabGrowth) %*% poly(8:11, degree=3)
colnames(trends)<- c("Linear", "Quad", "Cubic")
[At the risk of a long message, I'll append the complete .Rd file at the
end of this message, in case this was
2011 Aug 16
1
Repeated measures cummulative logit mixed model
Dear R help gurus,
I have the following problem and I would be delighted if you could help me.
>From a large (1500) cohort of patients we have been taking some measurements
(ECG measurements, but its not important). The measurements are ordinal in 4
grades (Grade I-IV, grade IV being the most severe form). Every patients has
been measured several times (usually once per year). The
2004 Aug 06
1
Comparing rows in a dataframe
Hello
I have a longitudinal dataframe organized in the long format and would like to make comparison between successive rows if certain conditions apply. Specifically, I have four variables of interest: grade, score, year, and schid, associated with each school with 3 measurements per school per grade, therefore the rows are temporally ordered and each school occupies multiple rows. For example,
2005 Aug 23
2
merge list entries
dear expeRts,
i would like to merge the data frame entries in a list. for example:
> #input
> myl <- list(q1=data.frame(id=c("Alice", "Bob"), grade=c(90, 49)),
q2=data.frame(id=c("Alice", "Chuck"), grade=c(70, 93)),
q3=data.frame(id=c("Bob", "Chuck"), grade=c(84, 40)))
> #output
> (mydf <-