Displaying 20 results from an estimated 200 matches similar to: "GGplot 2 – cannot get histogram and box plot axis to match."
2007 Jul 10
6
Having trouble using data returned by Ajax.request
Hello everyone, I''m new here.
I''ve been working with prototype and plotr for about a month now, off
and on, and I have pretty much hit the wall on using the data returned
by Ajax.Request.
I''m using some php code to return a string:
{''foo'': [[0,0.0865334429075127], [1,0.0828179861705063],
[2,0.0828173042602942], [3,0.0841707718624196]]}
But I keep
2012 Oct 10
1
impossible to fill point glyphs in a lattice plot
(sorry for repetition: the previous mail resulted from a weird manipulation
in the forum)
With the following code :
dat1 <- matrix(nrow=4, ncol=2)
dat1[1,] <- c(-2, 1)
dat1[2,] <- c(-1.7, 0.9)
dat1[3,] <- c(0.1, 0.6)
dat1[4,] <- c(0.5, 0.5)
theplot <- xyplot(V2 ~ V1, as.data.frame(dat1), pch=c(4,1,5,4))
plot(theplot, prefix="theplot") # for a predictable name
2012 Oct 10
1
Filling points in a trellis object
With the following code :
I would like to plot 4 points, and have the circle and diamond shapes filled
with grey. What am I missing ?
Thanks by advance for your help,
Pierrick Bruneau
Research Fellow
CRP Gabriel Lippmann
--
View this message in context: http://r.789695.n4.nabble.com/Filling-points-in-a-trellis-object-tp4645679.html
Sent from the R help mailing list archive at Nabble.com.
2007 Jan 26
2
Use a text variable's value to specify another varaible?
Greetings guRus --
If a variable, e.g., 'varname', is a character string, e.g. varname <-
"datavector", and I want to apply a function, such as table(), to
datavector, what syntax or method will do so using only the variable
varname? This seems similar to indirect addressing, but I have not seen
a method for it in the R manuals. Is there a general name for such
indirect
2010 Jul 08
4
Duda con orden Cars93
Cordial saludo,
Estoy haciendo una grafica de la base de datos Cars93 conde relaciono
Manufacturer con Price con este codigo
library(MASS)
with(Cars93,plot(Manufacturer, Price, las=2, ylab="Precio (en $1,000)"))
necesito el comando para que queden ordenados de manera ascendente como en
la grafica 2, muchas gracias por su ayuda
Grafica 1
[image: M-P.JPG]
Grafica 2
[image: M-P
2009 Jul 31
1
help in using gsub and ?
Hi all,
I would like to strip the R prompt from a series of code lines and copy the resulting text into a R script. For example, consider the following :
#####
str1<-"
> library(MASS)
> data(Cars93)
> attach(Cars93)
> imosaic(data.frame(AirBags,Cylinders,Origin))"
str2<-gsub('>','',str1)
######
This gives, as expected .?
> str2
[1] "\n
2013 Jan 28
1
gigFit problems
Hi, I am having some problems with gigFit and would like confirmation on
other platforms; mine is mint; basically Debian.
Although I got a good fit for the density function with the GIG equation
in another curve fitting program, I would really like to use R's tools
for confidence intervals and manipulations; but the problems below make
me uneasy.
Problem one (from examples with parameter
2004 Feb 10
1
make check in 1.8.1.
I just (finally!!!) got R version 1.8.1 to configure and build under
Solaris 9 (after much travail; there were funnies in my environment
variables that mucked things up, but that's another story).
Anyhow, when I ran ``make check'' I got an error right toward the
end. Looking in the directory ``tests'' I found that the error was
associated with the file reg-tests-3.R, and the
2001 Sep 08
2
Basic SPSS commands in R ?
Hello,
i'm newbie of R and think it is a really good alternative to SPSS.
But i have more problems using elementary things comparable with using advanced methods.
(1) How can i value label i.e the variable X in data.frame DATA
with the labels ( 1=very good ) (2=good).
spss syntax when DATA is in Spreadsheet is:
value labels X
1 'very good'.
2 'good'.
execute.
(2) How can i
2009 Jul 02
1
Quantitative Risk Management by McNeil
Dear Specialists in R,
May be somebody has experiment in using pakage for the book Quantitative
Risk Management by McNeil?
This package is writen in R.
I have run this package for fitting the data to Nornal Inverse Gaussian
distribution and fased with following problem.
> Return<-read.csv("data.csv")
> Transpose<-t(Return)
> fit.NH(Transpose, case="NIG",
2004 Apr 08
1
Why are Split and Tapply so slow with named vectors, why is a for loop faster than mapply
First, here's the problem I'm working on so you understand the context. I
have a data frame of travel activity characteristics with 70,000+ records.
These activities are identified by unique chain numbers. (Activities are
part of trip chains.) There are 17,500 chains.
I use the chain numbers as factors to split various data fields into lists
of chain characteristics with each element of
2008 Nov 25
1
row labels in heatmap.2(package gplots)
Dear R users,
I have a question regarding how to make row labels readable in a heat map.
I have successfully made a heat map using function "heatmap.2" in the package "gplots". However, as there are many rows in the heat map, I have difficulties labeling them (heatmap.2 provides a parameter "labRow" to label the row names, but as I have too many rows, I can not make
2000 Apr 26
2
plotting question
I would like to plot two different samples on the same scatterplot in R
using different symbols for the different groups.
Could someone please let me know how this can be done? Thank you very much.
Thad
*****************************************************************************
Thaddeus Tarpey Phone: (937) 775-2861
Wright State University
2009 Oct 02
1
ggplot2: proper use of facet_grid inside a function
Hello Again R Folk:
I have found items about this in the archives, but I?m still not getting
it right. I want to use ggplot2 with facet_grid inside a function with
user specified variables, for instance:
p <- ggplot(data, aes_string(x = fac1, y = res)) + facet_grid(. ~
fac2)
Where data, fac1, fac2 and res are arguments to the function. I have
tried
p <- ggplot(data,
2011 Aug 15
1
ggplot in a function confusion!
Whats going on here?
df<-data.frame(x=1:10,y=1:10)
ggplot()+geom_point(data=df,aes(x=x,y=y)) ## this is the normal usage
right?
ggplot()+geom_point(data=df,aes(x=df[,1],y=df[,2])) ## but I can also feed
it column indices
ggplot()+geom_point(aes(x=df[,'x'],y=df[,'y'])) ## or column names.
## but if i wrap it in a function...
plot.func.one<-function(dff,x.var,y.var){
2007 Dec 13
2
use ggplot in a function to which a column name is given
Hi everyone, Hi ggplot users in particular,
ggplot makes it very easy to plot things given their names when you
use it interactively (and therefore can provide the names of the
columns).
qplot(x,foo,data=A) where A has columns (x,y,foo,bar) for example
but I would like to use this from inside a function to which the name
of the column is given. I cannot find an elegant way to make this
2008 Mar 26
2
ggplot2 argument handling odd
Hello there,
I'm trying to do lots of plots in one for-loop. But somehow ggplot does
not evaluate arguments as expected. Here is an example:
library(lattice)
library(ggplot2)
pl <- list()
pl2 <- list()
cDat <- as.data.frame(cbind(x1=0:100,x2=0:10,x3=1:20))
for(obs in c("x1", "x2")) {
pl[[obs]] <- xyplot(cDat[,obs] ~ cDat[,"x3"], main=obs)
2008 Mar 25
2
ggplot2 - facetting
Dear All,
After having overcome the issue of legends (thanks, Thierry, once
more), I am trying to use facetting, but here also I can not find how
to do this. I do not want to use qplot, but rather the more flexible
options. However, it seems I am doing still something pretty stupid,
because I always get an error, even if it seems I am doing everything
like the examples.
My code is below.
2009 Apr 07
4
Re ading Excel 5.0 files with RODBC?
Hi,
i'm trying to read some data from excel files but it seems that neither
xlsReadWrite nor sqlFetch (RODBC) doesn't like the format (Excel 5.0).
When i open the file in Excel and save it in a new format Excel 97 -2003
everything works fine.
Is it possible to use ODBC connection to open old format files, or i guess i
will have to open and save every file in Excel in new format, which
2000 Jun 13
1
problem with aperm? (PR#568)
R version 1.0.1
OS RedHat Linux 6.1
In attempting to test for numeric vectors in a data frame, I tried:
apply(dataframe,2,is.numeric)
and found that it returned FALSE for all vectors whether they were
numeric or not. I tracked this to the fact that as.array() was
converting the data frame to character vectors, and thought I could
solve it by using array(), which preserved the mode of the