Displaying 20 results from an estimated 1000 matches similar to: "Axis labels"
2004 Jun 02
1
data filtering
I would like to know if there is a way to do the following command in
one step, primarily for speed on large data (5 million elements), and
secondarily for readablity.
mean(delta[(intersect(which(x[['class']]==0),which(delta<1)))])
Do I really have to rely on an intersect operator? Isn't that
O(nlg(n))? Can't I just filter in one step? As an R newbie, I would
have guessed
2003 Jun 04
2
convert factor to numeric
Hi R-experts!
Every once in a while I need to convert a factor to a vector of numeric
values. as.numeric(myfactor) of course returns a nice numeric vector of
the indexes of the levels which is usually not what I had in mind:
> v <- c(25, 3.78, 16.5, 37, 109)
> f <- factor(v)
> f
[1] 25 3.78 16.5 37 109
Levels: 3.78 16.5 25 37 109
> as.numeric(f)
[1] 3 1 2 4 5
>
What I
2003 Jul 26
1
bug plotting dates?
Hello R-experts!
I am using R Version 1.7.1 (2003-06-16) on a Debian Linux box and I
have discovered an odd result when plotting data involving dates. Please
try this minimal example:
a = seq(ISOdate(2000,1,1), ISOdate(2001,1,1), "months")
b = 1:13
plot(a,b, col="red")
What I get is a plot that looks as expected except the x-axis is mostly
red. Can anyone reproduce this
2001 Nov 28
2
Value lables, variable lables
I'm looking for an analogy to SPSS and "variable lable" and "value
lable" in R. I have a copy of S+4.0 and can't find any info in their
docs, and don't find it in R-intro either.
In SPSS, for each variable, there is a name like
VAR001
and a variable lable (a longer descriptive string) like
Respondent ID
and for many of the values of other variables there are
2013 Sep 15
1
Data labels in R
I need to put labels in plot in R. Can someone please help? The labels are
in the excel file and loaded into "lables"
library(xlsx)
library(zoo)
fPTAnalysis<-"Input.xls"
data<-read.xlsx(fPTAnalysis,9)
lables<-subset(data, select=c(Labels))
data<-subset(data, select=c(Date,col1, col2 ))
data<-read.zoo(data)
plot(data)
--
Regards,
Ankur Seth
[[alternative
2007 Sep 19
4
fontsize in mosaic plot lables
Hi List,
I am trying unsucessfully to modify the fontsize of lables in mosaic:
require(vcd)
mosaic(Titanic, pop=FALSE,
labeling_args=list(rot_labels=c(bottom=90,top=90),
set_varnames = c(Sex = "Gender"),
gp_text=gpar(fontsize=20))) #can't get it to resize text
tab <- ifelse(Titanic < 6, NA, Titanic)
# it works for labeling_cells
labeling_cells(text = tab,
2008 Sep 29
1
Lattice: don't draw unlabled tick marks
If I only want axis labels on the left and bottom I can set
alternating=F like in the following example:
Depth <- equal.count(quakes$depth, number=8, overlap=.1)
xyplot(lat ~ long | Depth, data = quakes, scales=list(alternating=F)
I also would like to get rid of the unlabeled tick marks (top and
right). How can I do that?
cu
Philipp
--
Dr. Philipp Pagel
Lehrstuhl f?r Genomorientierte
2008 Nov 05
3
Efficient way to fill a matrix
Dear R experts,
Suppose I have a data frame of three variables:
> foo <- data.frame(row=1:5, col=1:3, val=rnorm(15))
> foo
row col val
1 1 1 -1.00631642
2 2 2 0.77715344
3 3 3 0.17358793
4 4 1 -1.67226988
5 5 2 1.08218836
6 1 3 1.32961329
7 2 1 -0.51186267
8 3 2 -1.20990127
9 4 3 -0.57786899
10 5 1 0.67102887
11 1 2
2011 Apr 08
3
xyplot, groups and colors
Dear ExpeRts,
I am trying to plot a bunch of growth curves and would like to get
some more control over groups and line colors than I seem to have.
Example:
# make some data
dat <- Orange
dat$group <- ifelse(dat$Tree%in%c('1','4','5'), 'A', 'B')
# plot
xyplot(circumference~age, dat, groups=group)
# now use lines to make the growth curve more
2010 Aug 27
3
predict.loess and NA/NaN values
Hi!
In a current project, I am fitting loess models to subsets of data in
order to use the loess predicitons for normalization (similar to what
is done in many microarray analyses). While working on this I ran into
a problem when I tried to predict from the loess models and the data
contained NAs or NaNs. I tracked down the problem to the fact that
predict.loess will not return a value at all
2015 Jan 22
2
SELinux permissions for apache
Hey Jeremy,
> Have you tried changing the folder where it's writing into with these
> lables? httpd_sys_content_rw_t or httpd_user_content_rw_t
Adding 'rw' to the command did the trick. I tried httpd_sys_content_rw_t and
that works fine! Thanks for the tip!
Tim
On Thu, Jan 22, 2015 at 1:19 PM, Jeremy Hoel <jthoel at gmail.com> wrote:
> Have you tried changing
2004 Feb 10
2
Dotplot: y-labels from rownames
How can I use row.names() as y-labels in Dotplot? How to set horizontal
orientation for y-lables in lattice()?
Dotplot(stcod1 ~ Cbind(statgh2,statgh2-1.96*segh2,statgh2+1.96*segh2)[og],
subset=statgh2[og]>0.1, data=h2inqerrg02st, xlab="G",
ylab=row.names(h2inqerrg02st)[og], main="")
I have tried doing it with mtext() as well, but there is not enough space
besides
2011 Apr 27
1
read.table: fill=T for header?
Dear ExpeRts,t
I am trying to read tab delimted data produced by somewhat brain dead
software that seems to think it's a good idea to have an extra tab
character after the last column - except for the header line. As
explained in the help page, read.delim now assumes that the first
column contains the row.names (which is not even wrong) but now and all
col.names get shiftet by one column.
2006 Dec 14
1
legend/plotmath/substitute problem
Dear R Experts,
I am trying to produce a legend for a series of plots which are
generated in a loop. The legend is supposed to look like this:
2000: gamma=1.8
where gamma is replaced by the greek letter and both the year and the
value of gamma are stored in variables.
Everything works fine as long as I have only one data series:
year = 2001
g = 1.9
plot(1)
legend('top',
2006 Apr 07
1
[Q] Format of a plot axis label
Dear R-users
Can anyone please tell me how to format a label of a plot?
I found that R uses a floating point number (e.g. 2.0) sometimes and an
integer number (e.g. 2) other times in lables of a plot even though no
floating number is needed to show the lables.
How can I get R to use only integer numbers in the plot labels?
Thanks in advance.
Young-Jin
[[alternative HTML version deleted]]
2005 Jun 12
1
y-axis and resizing window
hi
using plot(..., las=1), i.e. horizontal axis labels, the labels on the
y-axis jams if the heigth of the graphics windov becomes too low
while both x-axis and y-axis kind of removes superflus lables with las=0
(default)
is there a way to make plot behave alike with horizontal lables?
regards s??ren
2015 Jan 22
2
SELinux permissions for apache
Hey all,
I have a simple php app working that writes some info to a text file. The
app will only work correctly if SELinux is disabled. If it's enabled and
try to use the app, it fails. It seems that SELinux is denying the app
ability to write to the text file.
So I tried running the following command:
chcon -R -t httpd_sys_content_t /var/www
And tried veriying the command with the
2010 May 13
3
Multiple plots; single x(y) labels
Hi All,
Can anyone please help me with getting a single x and y-axis label while
plotting muliple plots. Here is the code:
par(mfcol=c(2,2))
plot(x <- sort(rnorm(7)), type = "s", main = "", ylab="", xlab="")
plot(x <- sort(rnorm(27)), type = "s", main = "", ylab="", xlab="")
plot(x <- sort(rnorm(47)), type =
2009 Sep 26
1
Mixed font in lattice xyplot lables
Hi all, can anyone suggest a reason as mto why my xlab is plotting this text
at oposite ends of axis. I would like to represent my lable like this:
Moran's I ...but with the I in italics. For some reason they seperate and
position at oposite ends of the axis??
Thank you
library(lattice)
dat <- data.frame(x = rnorm(10),y = rnorm(10))
xyplot(y ~ x, dat,xlab=expression("Moran's
2006 Nov 10
2
mock syntax order
I have the following statement
mock_requester.should_receive(:request_with).with
("x").any_number_of_times.and_return(@object)
which works fine, but when i do it backwards, which makes the same
amount of sense syntactically, it fails
mock_requester.should_receive(:request_with).with("x").and_return
(@object).any_number_of_times
are all of the mock options