Displaying 20 results from an estimated 20000 matches similar to: "plot question"
2005 Apr 07
4
sweave bwplot error
Hi
I use sweave and have a problem with the following figure, but not with
other figures:
tt <- data.frame(c("a", "b", "c"), c(1.2, 3, 4.5))
names(tt) <- c("x1", "x2")
bwplot(x2 ~x1, data = tt)
ok now in sweave:
\begin{figure}[H]
\begin{center}
<<echo=FALSE, fig=TRUE, height=5, width=10>>=
lset(col.whitebg())
bwplot(x2 ~x1,
2005 Jun 14
2
Dateticks
Hello. I am having the worst time converting x-axis date ticks to real
dates. I have tried several suggestions in online help tips and books to
no avail.
For example, the x-axis has 0, 50, 100, etc, and I want it to have
"6/17/03", "8/6/03" etc. See attached (sample).
Can anybody help me with this.
Here's my code:
ts.plot(date.attackmode.table[,1],
2004 Feb 18
5
overlay points on plot
Dear R-help list,
I'm trying to overlay a number of data objects in a plot. Following an earlier example on the list I've created an empty plot as follows
> xlim <- range(as.numeric(c("0","10000")))
> ylim <- range(as.numeric(c("0","25")) )
> plot(NA, xlim=xlim, ylim=ylim, xlab="distance", ylab="semivariance")
2005 Feb 15
1
matlab norm(h) command in R: sqrt(sum(h^2)) - use in an expression
Hi
in matlab I defined a function (double gamma, parameters at the end of
this mail) as
h(i)=((t/d1)^a1)*exp(-(t-d1)/b1)-c*((t/d2)^a2)*exp(-(t-d2)/b2);
h=h/norm(h);
I do know that norm() in matlab is equal to:
sqrt(sum(x^2))
in R
so in R I do it like:
#function (double gamama)
h <- expression((t/d1)^a1*exp(-(t-d1)/b1)-c*(t/d2)^a2*exp(-(t-d2)/b2))
# plot it
t <- seq(0, 20000,
2005 May 25
3
Rounding fractional numbers to nearest fraction
Hi all,
I've got a matrix of fractional data that is all positive and greater than
zero that I would like to "loosely" classify, for lack of a better word. It
looks something like this :
1.07 1.11 1.27 1.59 0.97 0.76
2.23 0.98 0.71 0.88 1.19 1.02
What I'm looking for is a way to round these numbers to the nearest 0.25,
i.e. the above matrix would be
2004 Sep 24
3
Error with repeat lines() in function
I have a function that does some plotting. I then add lines to the
plot. If executed one line at a time, there is not a problem. If I
execute the function, though, I get:
Error in ans[[1]] : subscript out of bounds
This always occurs after the second lines command, and doesn't happen
with all of my data points (some do not have errors). Any ideas?
Thanks,
Sean
2005 Feb 16
4
(no subject)
R-people
I wonder if one could change a list of table with number of the form
1,200.44 , to 1200.44
Regards
JG
------------------------------------------------------------------------------
This e-mail and any attachment may be confidential and may also be privileged.
If you are not the intended recipient, please notify us immediately and then
delete this e-mail and any attachment without
2005 Feb 01
1
vectorization of a data-aggregation loop
Hi
I have a simple question:
the following data.frame
id iwv type
1 1 1 a
2 1 2 b
3 1 11 b
4 1 5 a
5 1 6 c
6 2 4 c
7 2 3 c
8 2 10 a
9 3 6 b
10 3 9 a
11 3 8 b
12 3 7 c
shall be aggregated into the form:
id t.a t.b t.c
1 1 6 13 6
6 2 10 0 7
9 3 9 14 7
means for each 'type' (a, b, c) a
2013 Mar 08
2
Zoo Data
Hi Jakob,
dat1<-read.table(text="
TIME, Value1, Value2
01.08.2011 02:30:00, 4.4, 4.7
01.09.2011 03:00:00, 4.2, 4.3
01.11.2011 01:00:00, 3.5, 4.3
01.12.2011 01:40:00, 3.4, 4.5
01.01.2012 02:00:00, 4.8, 5.3
01.02.2012 02:30:00, 4.9, 5.2
01.08.2012 02:30:00, 4.1, 4.7
01.12.2012 03:00:00, 4.7, 4.3
01.01.2013 01:00:00, 3, 4.3
01.01.2013 01:30:00, 3.8, 4.1
01.01.2013 02:00:00, 3.8,
2004 Oct 07
3
Read.Table Reading a Text file
Dear R users and Helpers
I am beginner with using R and interested in carrying out certain task for my statistical research.
I am reading data for a text file, which could contain data in following pattern
x y
8 10
11 14
16 16
18 15
6 20
4 4
20 18
As per the example I have two columns and 7 rows of data in each.
However is real life data situation I may not know how many columns are present
2012 Mar 20
1
overriding "summary.default" or "summary.data.frame". How?
I suppose everybody who makes a package for the first time thinks "I
can change anything!" and then runs into this same question. Has
anybody written out information on how a package can override
functions in R base in the R 2.14 (mandatory NAMESPACE era)?
Suppose I want to alphabetize variables in a summary.data.frame, or
return the standard deviation with the mean in summary output.
2007 Mar 07
5
How to open more windows to make more graphs at once!
Dear R users,
I have a data frame (test) including five columns of upper (numeric), lower (numeric), observed (numeric), best_sim (numeric) and stname (factor with 80 levels, each level with different length). Now I would like to write a short program to draw one graph as follow for each level of stname but I would like also to draw each time 12 graphs for the 12 levels of stname in the same
2010 Apr 16
6
bwplot puts the bars in the wrong place
Dear R-Help,
With the attached data set, I am still getting incorrect bwplots
> xyplot(gdf$tt~gdf$OnHour |gdf$Runway, data=gdf) # Is correct
> bwplot(gdf$tt~gdf$OnHour |gdf$Runway, data=gdf, horizontal=FALSE) #
Puts the boxes on the wrong x-axis values
# look especially at 0 and 3. How do I fix this?
What is happening?
Thanks,
Jim Rome
2003 Jun 19
1
Problem reading a PDF output
I generated a PDF output file of 10 plots. When I try to view it with
Adobe reader (R4 & R5), it will lockup the reader (it is consuming 100% of
the CPU) after presenting the 4th plot. I can generate the plots just fine
in Windows and as a postscript file reading it with GSview.
Is there anyway to tell what might be wrong with the PDF output? The file
is 890KB in size if anyone would like
2005 Jan 21
6
Avoiding a Loop?
Dear R-Helpers,
I have a matrix where the first column is known. The second column is
the result of multiplying this first column with a constant "const". The
third column is the result of multiplying the second column with
"const".....
So far, I did it like this (as a simplified example):
nr.of.columns <- 4
myconstant <- 27.5
mymatrix <- matrix(numeric(0), nrow=5,
2005 Oct 24
1
tk problem with R 2.2.0 on wine/linux
Actually I am trying to run sciview-R and encounted some problems with
tk, and I thought I'll check the basic library(tcltk) functionallity,
just to be sure. Anybody seen that '[tcl] bad window path name ".1".'
message before?
Prof. Philippe Grosjean: yes, I have managed to load most of
sciview-R under Wine, except the tcltk library!
===================
R : Copyright 2005,
2012 Jun 08
3
Resolution issue with exporting plots from R and write tables in Latex code for producing pdf document
Dear R users
I am trying to exporting plots from R to an external folder, or to the
working directory, but the resolution of plots (pdf file) largely reduced.
Any way I can get same quality as my original plots?? e.g. I tested the
plotting part using one example and obtained pretty good (/readable)
quality for each plot in the (4*4) multiple graph. But when I did the loop
and tried to export
2010 Dec 01
1
Font family not found in Windows font database
Dear R Gurus,
I have a fairly simple problem, but I haven't been able to find the answer on 'the google' or in the r-help archives.
I am generating plots on both Windows and OS X where I need to guarantee that the font used is Arial. In my plot command I specify 'fontfamily="Arial"'. The problem is that on Windows I'm getting the following warning:
Warning
2010 Jun 11
1
Windows, OSX and Linux: updating a graphic device and double buffering
Hello there,
I'm struggling with the base graphics system on different
operating systems.
I would like to get an animation effect by re-plotting with the plot
function. See the attached code example: move the slider
quick from one side to the other.
I experience different levels of success, depending on which OS I use.
- Linux (Ubuntu >9.10, R 2.9.2-3): Each plot command gets
2005 Jul 19
1
initial points for arms in package HI
Dear R-users
I have a problem choosing initial points for the function arms()
in the package HI
I intend to implement a Gibbs sampler and one of my conditional
distributions is nonstandard and not logconcave.
Therefore I'd like to use arms.
But there seem to be a strong influence of the initial point
y.start. To show the effect I constructed a demonstration
example. It is reproducible