On Mon, 24 Jul 2006 11:18:10 -0400,
Wade Wall [EMAIL PROTECTED] wrote:
Hi all, I have a matrix of 474 rows (samples) with 565 columns
(variables). each of the 474 samples belong to one of 120 groups, with
the groupings as a column in the above matrix. For example, the group
column would be:
Gabor Grothendieck [EMAIL PROTECTED] wrote:
On 7/7/06, Deepayan Sarkar [EMAIL PROTECTED] wrote:
On 7/7/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
Could you explain what panel.groups= does and what the difference
is between panel.groups= and panel= ? In ?xyplot it just says:
Hi,
The following produces almost exactly what I needed. The problems are
that the 'panel.dotplot' call (commented) generates the error 'Error in
NextMethod([) : argument subscripts is missing, with no default'. The
other problem is that the colors alternate between the levels of the 'site'
Hi,
I've looked into ways of implementing this procedure, i.e. repeating the
two-way ANOVA many times, scrambling the order of cases across the
treatments, to produce a distribution of F ratios for each effect. This
seemed a job for the 'boot' package. However, I'm not sure I'm doing an
actual
, June 2004.,
downloadable from www.r-project.org - Documentation: Newsletter as
well as the zoo vignette (see
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/67006.html;)?
hope this helps.
Spencer Graves
Sebastian Luque wrote:
Hi,
Say we have two chron vectors representing
[sorry for my previous empty follow-up -- my fingers got messed up.]
Spencer Graves [EMAIL PROTECTED] wrote:
Did you try the following:
xto-xfrom
Time in days:
[1] 1.50 1.75 2.00 2.25
I wanted to find the total amount of time between a series of date/time's
corresponding to particular
Hi,
Say we have two chron vectors representing start and end date/times of an
event, respectively:
R (xfrom - chron(seq(1.25, 11, 3.25)))
[1] (01/02/70 06:00:00) (01/05/70 12:00:00) (01/08/70 18:00:00)
[4] (01/12/70 00:00:00)
R (xto - chron(as.numeric(xfrom) + seq(1.5, 2.25, 0.25)))
[1]
Jean-Louis Abitbol [EMAIL PROTECTED] wrote:
Dear R Helpers,
I need to read time from a .csv file which is formated as chartime
(09:12:00) below. I need to add one minute (cf chartime2).
Then I need to output the value just as 09:13 without the seconds for
writing a csv file and input in
Doran, Harold [EMAIL PROTECTED] wrote:
[...]
a - c(2,3)
b - c(4,5,6)
(2*4) + (2*5) + (2*6) + (3*4) + (3*5) +(3*6)
But I do not know of a built in function that would do this. Any
suggestions?
How about:
sum(a %o% b)
?%o%
Cheers,
--
Seb
__
Hi,
I've run into a ridiculous problem I can't find any solutions for in the
archives or help pages:
data(barley)
cutYield - with(barley, by(yield, variety, cut, breaks = c(0, 30, 60, 90)))
As in this example, I'm using 'by' to return a factor for each level of
another factor. The problem is
Gabor Grothendieck [EMAIL PROTECTED] wrote:
Is this ok or is it what you are trying to avoid:
factor(unlist(lapply(cutYield, as.character)))
Thank you Gabor. The problem with that is what if some levels do not
appear in any member of cutYield? In that case, the factor created above
would
Sebastian Luque [EMAIL PROTECTED] wrote:
Gabor Grothendieck [EMAIL PROTECTED] wrote:
Is this ok or is it what you are trying to avoid:
factor(unlist(lapply(cutYield, as.character)))
Thank you Gabor. The problem with that is what if some levels do not
appear in any member of cutYield
Deepayan Sarkar [EMAIL PROTECTED] wrote:
[...]
Well, there are exceptions to this rule, but generally x and y, when
they are passed on to the panel function, are _already_ subsetted, so
x[subscripts] makes absolutely no sense. Note how your panel function
calls
panel.xyplot(x, y, ...)
Dear R-helpers,
I need to show a linear fit through a subset of the data within each
combination of levels of two factors. So I prepared an xyplot with
different panels for each level of one of the factors, and different
symbols within each panel for the levels of the second factor. My problem
, respectively. The 'p' and 'i' subscripts denote the pooled or
each individual curve, respectively. If this procedure has already been
implemented in a package, I'd be happy to hear about it. A search of the
archives and other sources didn't help.
Cheers,
--
Sebastian Luque
Tom Backer Johnsen [EMAIL PROTECTED] wrote:
[...]
However, one of the things I have not found in the documentation is some
way of preparing output from R for convenient formatting into something
like MS Word.
In case you're not talking about table-like output exclusively, reading
?Devices
Hi,
The following code produces a plot on X11:
splom(~iris[1:4], groups = Species, data = iris,
panel = panel.superpose,
key = list(title = Three Varieties of Iris,
columns = 3,
points = list(pch = super.sym$pch[1:3],
col = super.sym$col[1:3]),
text
Sebastian Luque [EMAIL PROTECTED] wrote:
[...]
pdf(splom-test.pdf, family = Times, bg = white)
[...]
Silly me, it occurred to me to check more carefully that bg argument,
which does something different in xyplot (namely, give a background to the
figure region, not the plot region as it seems
Hi Deepayan,
Deepayan Sarkar [EMAIL PROTECTED] wrote:
[...]
If you really want the frequencies for the whole (subsetted) data, you
might as well use something like:
dd - data.frame(age, sex, grp)
with(subset(dd, age 20),
bwplot(grp ~ age | sex, aspect = 0.5, box.ratio = 2,
Hi,
I'd like to add, say, the sample size for every group in a bwplot as a
parenthetical annotation to the axis. Here's a sketch:
--8---cut here---start-8---
require(Hmisc)
age - sample(1:100, 1000, replace = TRUE)
sex - gl(2, 8, 1000, c(Male, Female))
grp -
Marc Bernard [EMAIL PROTECTED] wrote:
Dear All,
I would be grateful if you can help me. My problem is the following:
I have a data set like:
ID time X1 X2
11 x111 x211
12 x112 x212
21 x121 x221
22 x122
Hello,
I've encountered the need to cut some chron objects of the form:
R mychron - chron(sort(runif(10, 0, 10)))
R mychron
[1] (01/01/70 16:36:20) (01/02/70 00:08:46) (01/03/70 16:54:49)
[4] (01/04/70 06:45:00) (01/07/70 06:21:24) (01/07/70 18:28:44)
[7] (01/08/70 00:47:05) (01/08/70
Gabor Grothendieck [EMAIL PROTECTED] wrote:
Assuming, as in your post:
set.seed(123)
mychron - chron(sort(runif(10, 0, 10)))
breaks - quantile(mychron)
# is one of these adequate?
cut(mychron, breaks)
cut(unclass(mychron), unclass(breaks), lab = FALSE)
Thank you Gabor, that showed me I
Spencer Graves [EMAIL PROTECTED] wrote:
How about the following:
set.seed(123)
mychron - chron(sort(runif(10, 0, 10)))
(breaks - chron(pretty(quantile(mychron
[1] 01/01/70 01/03/70 01/05/70 01/07/70 01/09/70 01/11/70
I was looking for a way to cut it into specified units of time, rather
Francisco J. Zagmutt [EMAIL PROTECTED] wrote:
Dear all
How can I obtain the name of the argument passed in a function? Here is a
simplistic example of what I would like to obtain:
myfunction= function(name) {
print(paste(The parameter name was,unknownFunction(name))
}
mark salsburg [EMAIL PROTECTED] wrote:
[...]
Mainly one that shows all the points, but when a point is clicked on
it shows what gene_name it is
I think ?identify will help you.
--
Sebastian P. Luque
__
R-help@stat.math.ethz.ch mailing list
Ken Termiso [EMAIL PROTECTED] wrote:
Hi all,
What I'd like to do is to is to be able to extract a string
corresponding to only the file name from a string containing the
complete path, i.e. from the following path string:
/Users/ken/Desktop/test/runs/file1
I would like to end up with:
Thanks a lot Martin and Gabor!
On Thu, 23 Jun 2005 08:20:44 -0400,
Gabor Grothendieck [EMAIL PROTECTED] wrote:
[...]
Also if you are referring to the chron package then
the names of the chron classes are 'dates' and 'times' -- not 'chron'.
However, when the object has both dates and times,
On Thu, 23 Jun 2005 10:13:31 -0400,
Gabor Grothendieck [EMAIL PROTECTED] wrote:
[...]
Just to be clear, the point is that you need to be sure that your chron
objects really have class chron since one often speaks of chron
objects that are of class dates or times but not chron.
That's right,
I'd like to define a class with a chron slot, but:
R require(chron)
R setClass(myclass, representation(datetime = chron))
[1] myclass
Warning message:
undefined slot classes in definition of myclass: datetime(class chron)
in: .completeClassSlots(ClassDef, where)
How should such a class be
Hi,
I thought this would be close to what you wanted:
x - seq(-1,1,.1)
y - sample(x, 3)
r1 - vector(mode = numeric, length = length(x))
sapply(y, function(k) {
y1 - max(k - 0.1, -1)
y2 - min(k + 0.1, 1)
r1[x = y1 x = y2] - 1
r1
})
but found that it's not replacing 3 elements of r1
Dear List members,
Thank you so much for your insights.
On Sat, 4 Jun 2005 09:39:33 +0100 (BST),
Prof Brian Ripley [EMAIL PROTECTED] wrote:
[...]
I think it is more likely you want to wait for the Tk interaction and
then return the results, that is use a `modal' widget. If so, take a
look
Hello,
I'm trying to write a function using tcltk to interactively modify a plot
and gather locator() data. I've read Peter's articles in Rnews, the help
pages in tcltk, http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/,
plus a post in R-help sometime ago, but haven't found a solution.
The
That's very interesting, thanks a lot Duncan. I should re-read the R
Language manual in more detail.
Sebastian
On 6/3/05, Duncan Murdoch [EMAIL PROTECTED] wrote:
Sebastian Luque wrote:
Hello,
I'm trying to write a function using tcltk to interactively modify a plot
and gather locator
Hello,
I cannot find how to avoid drawing tick marks on the opposite side of axes
in xyplot (lattice package). Say you have a simple plot:
x - y - rnorm(10)
xyplot(y ~ x)
There are tick marks on the top and right axes. Is it possible to turn off
drawing of those tick marks, or even turn off
Hi,
Is there some alternative to cumsum for chron objects? I have data frames
that contain some chron objects that look like this:
DateTime
13/10/03 12:30:35
NA
NA
NA
15/10/03 16:30:05
NA
NA
...
and I've been trying to replace the NA's so that a date/time sequence is
created starting with the
Hello Gabor,
Thanks for your reply. na.locf would replace the NA's with the most recent
non-NA, so it wouldn't create a sequence of chron dates/times (via
as.vector, as in your example). To expand my original example:
On 5/17/05, Sebastian Luque [EMAIL PROTECTED] wrote:
[...]
DateTime
13
I'm having trouble understanding how functions in the subset argument for
lmList search for the objects they need. This trivial example produces
Error in rownames(fakedf) : Object fakedf not found:
library(nlme)
fitbyID - function() {
fakedf - data.frame(ID = gl(5, 10, 50),
Hi,
I have a 3 panel xyplot with different variables in the y axis. I'm trying
to insert a newline after Width (cm), in the ylab argument as in the
example below. My goal is to have the y axis label broken into two lines,
split after the string just mentioned.
plotfun - function() {
fakedf -
Sebastian Luque [EMAIL PROTECTED] wrote:
I have a 3 panel xyplot with different variables in the y axis. I'm
trying to insert a newline after Width (cm),
Sorry, that should be VarC (cm), in the hypothetical example below!
--
Sebastian P. Luque
I'm trying to make my R scripts more readable by others, so I searched for
some R programming conventions and found the following two:
- http://www.ci.tuwien.ac.at/Conferences/useR-2004/Keynotes/Maechler.pdf
- http://www.maths.lth.se/help/R/RCC
the latter being quite extensive. Are there some
Mulholland, Tom [EMAIL PROTECTED] wrote:
I'm afraid you have lost me. What is it that you want that reordering
the formula does not achieve.
bwplot(yield ~ year | site, data = barley) has sites next to each other.
Yes, they are next to each other, but in different panels, as expected
when
Hi,
Is there some alternative to the 'groups' argument in lattice's bwplot
function for boxplots? Say in the example below:
bwplot(yield ~ site | year, data = barley)
you want to have two side by side boxplots per site, corresponding to each
year in the barley data frame. Ideally, the space
for other days here}
})
works for you? I've used something similar with 'panel.groups' as the main
panel function, but have never done it as above, so beware :-)
--
Sebastian Luque
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman
might do this in a ~/.odbc.ini
(i.e. the user's config file) file.
Best wishes,
--
Sebastian Luque
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting
template to include the rest of my databases further
down.
Can the latter go in ~/.odbc.ini as I said before? I hope so, as this
would allow for much easier maintenance.
Thanks again for the helpful reply.
--
Sebastian Luque
__
R-help@stat.math.ethz.ch
Sebastian Luque [EMAIL PROTECTED] wrote:
[...]
Can the latter go in ~/.odbc.ini as I said before? I hope so, as this
would allow for much easier maintenance.
Yes, I just found ODBCConfig, a tool that is supplied with unixodbc for
this sort of manipulations.
Cheers,
--
Sebastian Luque
Gorjanc Gregor wrote:
same/similiar packaging system (dependencies, ...) as Debian. Is it wise
to mix all three methods?
Mixing R CMD and install.packages() doesn't pose any problems, AFAIK, but
mixing any of them with apt-get does. The problem is that apt-get doesn't
know what you're doing
Dear List,
I've tried to set default par() in .Rprofile by putting the following in
the .First function:
setHook(packageEvent(graphics, onLoad),
function(...) {graphics::par(cex.axis=1.5, cex.lab=2, las=1)}
)
My goal was to set par() defaults without opening a device
Hello,
I have been searching for ways to obtain these for combinations of fixed
factors and levels other than the 'baseline' group (contrasts coded all
0's) from a mixed-effects model in lme. I've modelled the continuous
variable y as a function of a continuous covariate x, and fixed factors
Hi all,
Does anybody know whether one can nest an 'if' statement in a 'for'
loop. According to the results of my code, the for loop is performed
first, but I'm not sure I got something else wrong with my code. I'm
trying to perform the if statement for each step of the for loop. Thanks
in
51 matches
Mail list logo