Hi,
I was unable to find documentation about how to include the letter 'n' with
tilde above it, like this: ñ.
Is it possible to do that?
Thank you,
Judith
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https:
Hello R-users,
I have a data frame whose names of columns I don't know a priori, but the
user of my code will know them. The user is supposed to save the name of the
column that will need some reordering of the levels of the factor later on. The
name of the column will be saved in an object
Hello,
I need to add superscripts of the strip labels of a xyplot.
For example:
xyplot(a~b|c)
Where c has 3 factor levels: A^2, A^3 and A^4. How can I introduce
expressions in the strip labels?
Thank you very much!
Judith
__
R-help@r-proj
Hello,
I am trying to use mgp.axis labels to locate the x-xis at a different
distance from the one specified for the y-axis. I know I could use other
functions such as mtext or axis. But I am curious to know about how to use
'mgp'axis.labels' from the Hmisc package. I tried following the exa
Hello,
In the past I have used "expression" to include greek letters in axis
labels,
but this time I need to include the greek letter as part of a legend.
Basically,
I need to create the following vector to rename the levels of a factor:
c("Interferon-gamma", "IL-10", "IL-5"), where "gamma
Hello dear R-helpers,
I haven't been able to figure out of find a solution in the R-help archives
about how to delete all the characters contained in groups of parenthesis. I
have a vector that looks more or less like this:
myvector<-c("something (80 km/h, sd) & more (6 kg/L,sd)", "something
Hello R-community,
I want to generate stacked density plots in lattice. My data consist of a
numeric variable ('pid') that is measured in different individuals ('id'),
which can be divided in two types ('type') and the measurements were repeated a
different time points ('day').
I read in
Hello,
I need to multiply the number of counts in the y-axis of a lattice histogram
by a constant factor, such that the plot would represent a different type of
variable plotted in the y-axis, not counts. Can this be done?
Thank you,
Judith
__
R
Hello dear R-community,
I have been trying to figure out a way to generate histograms of a numeric
variable observed in different entities ('individual' below). Each one of this
entities is classified as "A" or "B" (according to the pseudo-code below):
variable<-sample(rep(1:10,10))
indiv
Hello,
I have a y-axis label that reads: "S. schenckii yeast cells". The part that
reads "S. schenckii" needs to be in italic style, the rest of the text is
normal style. How can I specify the different font styles for each part of the
y-axis label?
Thank you,
Judith
__
Hello,
I have an expression that I want to substitute for something else.
myvector<-c("ajkhfkiuwe","Variable(kg/min)")
if I use the following code to extract "variable(kg/min)" and substitute it for
"va"
gsub(myvector[grep("var", myvector, ignore=T)], "va", myvector)
grep identifies the e
Hello,
I am trying to setup a menu to open files and directories. I have the
following code:
opendir<-function() {
dirname<<-tclvalue(tkchooseDirectory())
}
openfile<-function() {
filename<<-tclvalue(tkgetOpenFile())
}
require(tcltk)
t1<-tktoplevel()
topMenu<-tkmenu(t1)
tkconfigure(
Hello,
I would like to add a horizontal line to each individual panel panel, the
length of the segment is given by a vector. If you run the following lines (a
very simplified version of my script and data):
group<-c('A','A','A','A','B','B','B','B','C','C','C','C')
value<-c(89,35,58,33,45
Dear experts,
I am trying to understand why is it that when I paste (into the R console)
the following code to select an option from a list:
require(tcltk)
tt<-tktoplevel()
tl<-tklistbox(tt,height=ntx,selectmode="single",background="white")
tkgrid(tklabel(tt,text="Select the legend of
Hello,
I am sorry if this is an answered question, but I did my homework for a long
while and couldn't figure out a way to retrieve data entry from a model dialog.
In one of the examples compiled by James Wettenhall:
odalDialog <- function(title, question, entryInit, entryWidth = 20,
ret
Hello,
is there a function to check if an object exists?
Thank you,
Judith
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide co
Hello dead R-experts,
I work on x86_64-suse-linux and I am using R 2.7.1. I created several
scripts that will be used by several people that are not familiar with R. I
would like to create a GUI to call the scripts that the users would choose to
run, also, the GUI should allow them to choose
Hello,
I have been trying to apply some of the different
ways suggested in the past to replace empty values in
a vector for a letter, without success.
Actually, I have a data frame that might contain
empty values, I need to replace all those empty values
for the letter 'N'.
This was my l
Sorry, I hit the send botton by accident. Here is my
code so far:
dat<-read.csv('myfile.csv', na.strings="")
dat[is.na(dat]<-'N'
But it doesn't replace the for the letter 'N'.
I am using R v 2/7/0, running it under Windows
XP.
Thank you,
Judith
__
Dear R experts,
I am sorry for sending this email again. I would
imagine yesterday and maybe today, have been very busy
days with the release of R v 2.7.0. I join all the R
users who are very gratful for your contant work and
efforts, specially knowing that you are doing this for
the sake of
Dear R experts,
I am trying to optimize my script, because right
now it requires a lot of memory. The goal is to
generate four plots in one page. Every plot
corresponds to the means and sem's calculated for a
given variable at different days. In order to obtain
the means and sem's I apply the
Dear R experts,
I have been looking into the help-pages and old
questions from the R-Help site, but the options
offered there don't seem to work in my case.
First of all, I am working on Windows XP, using R
version 2.6.2.
I am attaching two csv files as an example of how
the data I am tra
Hi there,
I found one reference to add a reactangle behind a
plot using plot(...,add=T), I tried this but didn't
obtain the desired result.
If a I have the following code:
plot(x,y)
rect(xleft, ybottom, xright,ytop,col='green)
The rectangle appear on top of the plot.
Any help will be gre
Sorry, I just realized I didn't type in the correct
names of the variables I am working with, this is how
it should be:
plot(1,1,type="n")
for (i in summ$tx) {
points(summ$timep[summ$tx==i],summ$mn[summ$tx==i])
lines(summ$timep[summ$tx==i],summ$mn[summ$tx==i])
}
Thank you,
Judith
Dear R-experts,
I want to assign different colors to groups of
points, lines and segments in a plot.
I have a vector(dat$tx) that is going to have a
different number of levels every time the user wants
to plot a set of data. The number of lines is going to
be equal to the number of levels of
Dear R-experts,
I am running a script that has the following
structure:
windows(height=5.5,width=8)
dat<-read.csv("myfile.csv")
names(dat)<-c('a','b','c','d')
dat<-dat[,1:4]
xyplot(dat$a~dat$b)
Then I usually save the plot as a PDF (from the
menu in the R console). I can save the PDF tw
Dear R-helpers,
I need to retrieve the data frames generated in a
for loop. What I have looks something like this:
where tab is a pre-existing data frame.
for (i in 1:20) {
g<-sample(rep(LETTERS[1:2],each=10))
combination<-data.frame(tab,g)
}
I tried to name every single combi
Dear R-experts,
I need to replace the values of a vector(tx) with a
word ('Vehicle') when the value of the vector contains
the word 'vehicle'. Sometimes, the value could be 'MCT
vehicle', or 'control-vehicle', etc.
I tried gsub like this
treatment<-gsub('vehicle','Vehicle', tx,
ignore.case=
Hi there,
I want to generate different samples using the
followindg code:
g<-sample(LETTERS[1:2], 24, replace=T)
How can I specify that I need 12 "A"s and 12 "B"s?
Thank you,
Judith
Be a better
I need to group some subjects according to two
variables (var1, var2)
I have a data frame that looks something like this:
Subject var1 var2
1 400150
2 320100
3 580600
4 145789
Each suject would fall into one of
Hi,
Is there an analog function of textplot in the
lattice package? I need to add a data frame to a
lattice plot. I work in a Windows environment and I am
using R v 2.6.1
Thank you,
Judith
Be a bette
Hi R-experts,
Is it possible to add a table (text and lines) to
the plot area?
I have a data frame that looks something like this:
>mydata
Time SD Mean
12.5 30
2a.3 40
I am using R 2.6.1, in Windows.
Thank you,
Judith Flo
Dear R-experts,
I need to run a R code on different computers (MACs
and PCs) on different monitos sizes. The code
generates graphs that are displayed in the same page.
But there are some elements of the graphs that appear
at the right position on a PC, but they don't appear
at all when I run it
Hi Deepayan and everyone,
I need to add a common legend to a group of latice
graphs, I have tried different ways using viewport and
grid.draw without success.
Here is what I have:
plot.new()
library(grid)
library('IDPmisc')
print(plot1, split=c(1,1,2,4), more=TRUE)
print(plot4, split=c(2,1,
Hi there,
I need to save a series of lattice plots as a PDF,
this is my code so far:
windows(height=8,width=6)
plot.new()
library('grid')
lattice.options(layout.heights=list(top.padding=list(x=0.15,
units="inches")))
print(plot1, split=c(1,1,2,3), more=TRUE)
print(plot2, split=c(1,2,2,3), mor
Hello,
I need to add some text in the upper left position,
outside a lattice plot.
xyplot(x~y)
ltext(locator(1), label='My text')
doesn't work.
I would appreciate any help. Tahnk you,
Judith
Be
Hi,
I have a vector in a data frame that looks
something like this:
day<-c('Day -1','Day 6','Day 10')
This vector specifies the order in which several
panel will appear in a lattice plots. But the order in
which such plots will appear will be the following:
Day -1, Day 10, Day 6. Which ma
Sorry about that, it was sent by accident.
I have a data frame that looks something like this:
id dayk
56 -1 566
63 -1 680
73 -1 773
56 2 298
63 2 273
Of course, it is a very simplified version of the
real data frame I am working on. I need to add another
colum
Hi,
I have a data frame that looks something like this:
id dayk
656 -1 566
663 -1 680
673 -1 773
675 -1 761
704 -1 685
714 -1 636
717 -1 421
719 -1 645
727 -1 761
731 -1 663
11 735 -1 603
12 738 -1 865
13 742 -1 594
14 744 -1
Hi all,
I I need to manipulate the x axis in a stripchart.
I will use one of the data sets included in R to
explain what I need to do.
attach(ToothGrowth)
stripchart(len[supp=='VC']~dose[supp=='VC'],
vertical=TRUE, group.names=c('A','A','A'))
stripchart(len[supp=='OJ']~dose[supp=='OJ'], add=
Hi,
I am trying to arrange 3 different lattice plots in
one page. I tried defining par and layout without
success.
What I wrote looks something like this:
par(mfrow=c(3,1))
barplot(...)
xyplot(...)
barplot(...)
___
Dear R-helpers,
I am sorry for asking something I know has been
asked before, I have tried different combinations in
the strip function without success...
I am using version 2.5.1 and work on a PC.
I have barcharts generated from the following
formula:
barchart(y1+y2+y3~x | g)
I ne
Hi,
I tried to install the caTools package manually
from the main R Project website and I get the
following error message when typing library('caTools')
Error in library("caTools") :
'caTools' is not a valid package -- installed <
2.0.0?
What am I doing wrong? Also, why is this package
Is there a command to insert a table into the plot
area other that using text?
Thank you.
Luggage? GPS? Comic books?
__
R-help@r-project.org mailing list
https
44 matches
Mail list logo