I used gawk and perl prior to using R but as I got more proficient in
R I found I could do just about everything in R itself and have largely
forgotten perl at this point and rarely use gawk either. I must say
I never liked perl and if python were more mature back then I
probably would have used
Use bquote:
ID - 3
plot(1,1, main = bquote(ID ~ is ~ .(ID)))
Also please read the last line of every message to r-help regarding
reproducible examples. (None of your variables were defined.)
On 12/22/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hello.
I have a question that probably has a
Its only available on Windows.
On 12/22/06, Nicolas Mazziotta [EMAIL PROTECTED] wrote:
Dear Sir,
Le vendredi 22 décembre 2006 20:05, vous avez écrit :
system(sh,intern=T,input=c(echo x,echo y))
Thanks for the advice, but I do not find doc about the input arg for the
system function.
You can do this:
fb - function(bS, env = parent.frame()) {
bS - deparse(substitute(bS))
assign(bS, 3, env = env)
}
fb(bS)
bS
rm(bS)
# or corresponding to your code
fb(bS, env = .GlobalEnv)
Of course when typed in both give the same result since the global
Do a google search for
cran contributed documentation
and at the first hit you will find numerous introductions that may be
of use to you.
Also read the last line of every post to r-help.
On 12/21/06, Ulrich Kaiser [EMAIL PROTECTED] wrote:
Dear R users,
I have spent most of this day
Try this:
e - expression(O[3], NO, NO[2])
opar - par(mfrow = c(2,2))
for(i in 1:3) plot(1, 1, type = b, main = bquote(.(e[[i]]) ~ Year ~ 2005))
par(opar)
Also please read the last line to every post to r-help and particularly note
the part about reproducible examples. x and y.were undefined.
Just store them as strings in the data frame and then perform a conversion
to expressions prior to the loop:
DF - data.frame(s = c(O[3], NO, NO[2]), stringsAsFactors = FALSE)
e - parse(text = DF$s)
... continue with prior solution ...
On 12/20/06, MrJ Man [EMAIL PROTECTED] wrote:
Thanks for
Read R News 4/1 help desk article and the last line of every message to r-help.
Also putting POSIXlt objects into data frames is asking for trouble.
On 12/19/06, Shubha Karanth [EMAIL PROTECTED] wrote:
Hi Experts,
I have a problem in Dates.
I have a zoo object called 'intra'. And the
Try
aggregate(DF[4], DF[1:3], mean)
On 12/16/06, Pedro Alcocer [EMAIL PROTECTED] wrote:
Hello,
My ultimate goal is a repeated measures (mixed model) ANOVA, however,
my present question is about how to reorganize my data into the format
that the ANOVA commands expect. In particular, how to
Using zoo would allow you to retain the date/time portion. In ts you would
have to represent them as numbers; however, as you can easily switch
from zoo to ts you probably want to use zoo in the first instance:
library(zoo)
library(chron)
Lines - DateIDHourIDMetrics
200609200
See aggregate.zoo and maybe ?rollapply
For date manipluations see R News 4/1 help desk article and the table at
the end of that article, in particular.
Suggest you also read and follow the last line on every r-help message
when posting.
On 12/10/06, Alfonso Sammassimo [EMAIL PROTECTED] wrote:
Hi
Don't know of a more straight forward way but this works. It constructs
a new call to bwplot from the one to x.grp2 and evaluates it in the
parent environment:
library(lattice)
x.grp2 - function(x, groups, data) {
cl - match.call()
cl[[1]] - as.name(bwplot)
eval.parent(cl)
}
x.grp2(
I am not familiar with velocity or freemarker but
the gsubfn package can do string interpolation
somewhat similar to perl. The gsubfn and strapply
functions in that package can handle arbitrary regular
expressions in a similar way. See:
http://code.google.com/p/gsubfn/
On 12/7/06, Ido M.
You need perl installed for it to work.
Although you normally would not need to use them note the
verbose= and perl= arguments on the read.xls command.
If you don't want to install perl try using RODBC:
library(RODBC)
z - odbcConnectExcel(/a.xls)
dd - sqlFetch(z,Sheet1)
Google for
contributed documentation CRAN
and in the first hit look through the several dozen tutorials there until you
find one that describes the apply functions in a way meaningful to you.
There is also some tutorial information on the relevant portion of this page:
Using the builtin anscombe data set try this where we note that
the first 4 columns are x1, ..., x4 and the fifth column is y1.
for(i in 1:4) print(coef(lm(y1 ~., anscombe[c(1:i, 5)])))
On 12/6/06, Brooke LaFlamme [EMAIL PROTECTED] wrote:
Hi all,
I am running R version 2.4.0 on Windows
On 12/4/06, Peter Dalgaard [EMAIL PROTECTED] wrote:
Robin Hankin wrote:
Peter
Aha! so R backticks work just like bash backticks (duh!)
Er, no. Backticks in shells have a command inside that will be evaluated
and replaced by its output. (This is a bit confusing, but single and
double
Try :
environment(f) - baseenv()
There is also emptyenv() depending on what you want.
See ?baseenv
On 12/2/06, Carmen Meier [EMAIL PROTECTED] wrote:
Hi To all,
I found in the tread
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/46740.html
the reply for
/ y - 3 /
/ f - function(x) y
Try this:
x - readline()
C:\Program Files\R\R-2.4.0\bin\Rgui.exe
x
[1] C:\\Program Files\\R\\R-2.4.0\\bin\\Rgui.exe
You can also use
readLines(clipboard)
if you are trying to read in something from the clipboard.
On 12/2/06, Shubha Karanth [EMAIL PROTECTED] wrote:
Hi Experts,
I
Files\\R\\R-2.4.0\\bin\\Rgui.exe
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gabor
Grothendieck
Sent: Saturday, December 02, 2006 5:21 PM
To: Shubha Karanth
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Fwd: Urgent Help in Paste Command
Try
See the last example in ?qplot
On 12/1/06, Rainer M Krug [EMAIL PROTECTED] wrote:
Hi
is it possible to specify the shape of the point to be used in ggplot
(as with pch in plot)? I couldn't find anything in the help.
Thanks
Rainer
--
Rainer M. Krug, Dipl. Phys. (Germany), MSc
Yes by using the lty suboption of superpose.line.
Here is a modification of the prior example to illustrate:
We also use lwd as well in this example.
set.seed(1)
DF - data.frame(x = c(rnorm(100,1,2),rnorm(100,2,4),rnorm(100,3,6)),
f = sample(c(A,B,C,D,E),300,replace=TRUE))
,
xmlHeader=TRUE)
densityplot(...)
dev.off()
I am getting all the lines as continuous, not dashed...
On 11/30/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
Yes by using the lty suboption of superpose.line.
Here is a modification of the prior example to illustrate:
We also use
Try:
plot(1, main = ~ D[obs]^*)
On 11/30/06, Guenther, Cameron [EMAIL PROTECTED] wrote:
Hi all,
I have a question about expression.
In a figure I want to include the term D*obs with the star as as
superscript and obs as subscript. I have even just tried to get the
star to be superscript.
It did work. That's how print represents strings.
Try:
cat(hello \hello\ hello)
hello hello hello
strsplit(hello \hello\ hello, )[[1]]
[1] h e l l o \ h e l l o \h
[16] e l l o
On 11/30/06, roger bos [EMAIL PROTECTED] wrote:
I want to use R to run dos commands (either
Try this:
test - function(x, ...) {
+ print(x)
+ dots - list(...)
+ if (y %in% names(dots)) print(dots$y)
+ }
test(3, y = 43)
[1] 3
[1] 43
test(4, z = 44)
[1] 4
On 11/30/06, Carmen Meier [EMAIL PROTECTED] wrote:
Hi to all
I did not found the right hints for functions with the dot-dot-dot
As requested on last line of every message to r-help please
provide self contained reproducible code. Also please
space it properly since its very difficult to read in your post.
I have used the models defined in example(Puromycin)
in place of your undefined ones and made some changes
to keep
Preprocess the file surrounding the last field with quotes. The
xx - line is for purposes of making it self contained here and in
reality would
be replaced with the commented
line above it. It simply reads the text in.
The yy - line
then surrounds the fourth field with double quotes assuming
at
Try:
# TRUE if all 0 and 1
regexpr(^[01]*$, bits) 0
# positions of 1s
gregexpr(1, bits)[[1]]
On 11/29/06, Carmen Meier [EMAIL PROTECTED] wrote:
Hi to all
I would to determinate whether bits is a binary code and I would to find
out the which bit is set to 1
bits -00110110
I found to
These retrieve and set environment variables:
?Sys.getenv
?Sys.putenv
On 11/29/06, Karin Lagesen [EMAIL PROTECTED] wrote:
I have searched through the mailing lists and the docs, and I seem
completely unable to find a way to make R list all available
environment variables that it uses.
The
Try creating a zoo object from your data frame
# data from your post
DF - structure(list(Date = as.integer(c(20061122, 20061115, 20061108,
20061101, 20061025, 20061018, 20061011, 20061004, 20060927)),
IBM = as.integer(c(12, 12, 12, 12, 12, 12, 11, 12, 10)),
MSFT = as.integer(c(4, 4, 4, 4,
Try specifying it at the par.settings= level since that is where both
the plot and the legend get it from:
set.seed(1)
DF - data.frame(x = c(rnorm(100,1,2),rnorm(100,2,4),rnorm(100,3,6)),
f = sample(c(A,B,C,D,E),300,replace=TRUE))
library(lattice)
densityplot(~ x, DF, groups = f, auto.key
Using the builtin data set CO2:
aggregate(CO2[4:5], CO2[1], mean)
calculates the means of variables 4 and 5 based combinations of the
levels of variable 1. Is that what you want?
On 11/29/06, David Kaplan [EMAIL PROTECTED] wrote:
Chuck and others. Here is the problem I need help on.
I meant: calculates the means of variables 4 and 5 based on the levels of
variable 1. Is that what you want?
On 11/29/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
Using the builtin data set CO2:
aggregate(CO2[4:5], CO2[1], mean)
calculates the means of variables 4 and 5 based
Do you really want the 1? Normally the intercept is not explicitly
given unless there are no other terms in the formula so assuming you
only want it if you have otherwise removed all the variables then:
zap1 - function(fo) {
L - sapply(all.vars(fo[[length(fo)]]), function(x)
)]]), function(x)
nlevels(get(x, environment(fo))), simplify = FALSE)
fo - eval.parent(do.call(substitute, list(fo, L[c(L) == 1])))
update(fo, . ~ .)
}
# test data
x - y - 1:3
z - factor(0*x)
fo - x ~ y + z
# test
zap1(fo) # x ~ y
y - z
zap1(fo) # x ~ 1
On 11/30/06, Gabor Grothendieck
DF - data.frame(a = c(3, 4, 2, 3, 2, 4, 2), b = 7:1))
DF[do.call(order, DF),]
will sort on all the columns.
On 11/28/06, michael watson (IAH-C) [EMAIL PROTECTED] wrote:
Hi
Sorry to ask such a well oiled question, but even with multiple google hits I
don't think this has been answered very
Maybe:
file.remove(file.path(myDir, list.files(myDir)))
or
here - setwd(myDir)
file.remove(list.files())
setwd(here)
On 11/28/06, Hans-Peter [EMAIL PROTECTED] wrote:
Hi,
I try to delete the files in a directory. While the command
invisible(lapply( list.files( DeleteThis ), function(x)
The following matches pat1 followed by an ungreedy match of
what is in between followed by pat2. What is in between is
defined to be backreference 1 which is returned. See:
http://code.google.com/p/gsubfn/
for more on strapply and the gsubfn package.
# test data
a - something2 pat1
The denominator holds the variance and since the variance is zero you
get that. Calculate the covariance instead of the correlation:
ccf(x, y, plot = FALSE, type = cov)
On 11/27/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
hello,
i have been using ccf() to look at the correlation
If DF is the data frame in your post then turn it into a zoo
object, convert that to class ts and then back to zoo replacing
NA's with zero:
library(zoo)
z - zoo(DF$Freq, as.yearmon(as.Date(paste(DF$Var1, 01, sep = -
zz - as.zoo(as.ts(z))
zz[is.na(zz)] - 0
Suggest you read the
-0520
Voice: (865) 974-5230
FAX: (865) 974-4810
Email: [EMAIL PROTECTED]
Web: http://oit.utk.edu/scc,
News: http://listserv.utk.edu/archives/statnews.html
=
-Original Message-
From: Gabor Grothendieck [mailto:[EMAIL PROTECTED
Ryacas starts up yacas with an initialization file R.ys which puts
the server in a mode which outputs XML (which is what Ryacas reads).
It does that by specifying --init /whatever/R.ys on the yacas command line
when it is run.
You can run yacas without that init file or you can just enter into
if the original if is false. The check for f when not m I put in only
to exclude missing values for gender.
Thanks!!
Bob
-Original Message-
From: Gabor Grothendieck [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 25, 2006 7:37 AM
To: Muenchen, Robert A (Bob)
Cc: r-help
Based on integration it appears that .0721 is correct.
integrate(function(x) exp(-x^2/2)/(2*pi)^.5, -Inf, -1.46)
0.07214504 with absolute error 1.2e-07
On 11/25/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
In checking over the solutions to some homework that I had assigned I
observed the
, Gabor Grothendieck [EMAIL PROTECTED] wrote:
Here are some additional solutions. It appears that the SAS code is
performing
the transformation row by row and for each row the code in your post is
specifying the transformation so if you want to do it that way we
could use 'by'
like this (where
or even shorter:
plot(1, xlab = Level is ~ italic(M))
On 11/23/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
Try this:
plot(1, xlab = quote(Level is ~ italic(M)))
or
plot(1, xlab = quote(Level ~ is ~ italic(M))
On 11/23/06, Philip Boland [EMAIL PROTECTED] wrote:
Just wondering
merge.zoo can do that:
p1 - 100
p2 - c(20, 80)
p3 - c(40, 10, 50)
library(zoo)
t(merge(p1 = zoo(p1), p2 = zoo(p2), p3 = zoo(p3), fill = 0))
1 2 3
p1 100 0 0
p2 20 80 0
p3 40 10 50
On 11/24/06, bunny , lautloscrew.com [EMAIL PROTECTED] wrote:
my vector of answers could have a
Try this:
transform(mydata,
score1 = (2 + (gender == m)) * q1 + q2,
score2 = (2.5 + (gender == m)) * q1 + q2
)
On 11/24/06, Muenchen, Robert A (Bob) [EMAIL PROTECTED] wrote:
Mark,
I finally got that approach to work by spreading the logical condition
everywhere. That gets the
And here is a variation:
transform(mydata,
score1 = (2 + (gender == m)) * q1 + q2,
score2 = score1 + 0.5 * q1
)
or
transform(
transform(mydata, score1 = (2 + (gender == m)) * q1 + q2),
score2 = score1 + 0.5 * q1
)
On 11/25/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
Try
Try this:
xyplot(IDUPREV + VALIDAT~ YEAR | MSA, data = df, type= c(smooth, o))
On 11/23/06, Chuck Cleland [EMAIL PROTECTED] wrote:
Hello:
I recall something like this being discuss recently, but I can't seem
to locate an example in the archives. I have data like the following:
df -
Try this:
plot(1, xlab = quote(Level is ~ italic(M)))
or
plot(1, xlab = quote(Level ~ is ~ italic(M))
On 11/23/06, Philip Boland [EMAIL PROTECTED] wrote:
Just wondering if it is possible to put something like
The excess level is M
in the xlab position of a plot but where the M is in
Its a bug. Thanks. It will be fixed in the next version of zoo.
In the meantime I will send you a fix offline.
On 11/23/06, Albrecht, Dr. Stefan (AZ Private Equity Partner)
[EMAIL PROTECTED] wrote:
Dear all,
I have an error message, when I try to convert a zoo object (called
test) to ts (on
On 11/23/06, Antonio, Fabio Di Narzo [EMAIL PROTECTED] wrote:
2006/11/23, Prof Brian Ripley [EMAIL PROTECTED]:
On Thu, 23 Nov 2006, Antonio, Fabio Di Narzo wrote:
Dear all,
I'm indirectly faced with the fact that setting the 'tsp' attribute of
an object modifies its class definition:
On 11/23/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
On 11/23/06, Antonio, Fabio Di Narzo [EMAIL PROTECTED] wrote:
2006/11/23, Prof Brian Ripley [EMAIL PROTECTED]:
On Thu, 23 Nov 2006, Antonio, Fabio Di Narzo wrote:
Dear all,
I'm indirectly faced with the fact that setting
Try the Ryacas package:
library(Ryacas)
a - Sym(a); b - Sym(b); c - Sym(c); d - Sym(d)
M - List(List(a*b, a*c), List(d, d))
deriv(M, a)
expression(list(list(b, c), list(0, 0)))
On 11/23/06, Ron E. VanNimwegen [EMAIL PROTECTED] wrote:
UseRs,
We are using projection matrices in demographic
On 11/23/06, Paul Smith [EMAIL PROTECTED] wrote:
On 23 Nov 2006 18:20:17 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote:
I am trying to convert from the type expression to the type
numeric. The following works:
x - expression(6.2)
as.numeric(as.character(x))
[1] 6.2
Also note that Ryacas provides an Eval which has a yacas method
that simplifies writing this:
library(Ryacas)
Eval(yacas(1/2))
See ?Eval
On 11/23/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
On 11/23/06, Paul Smith [EMAIL PROTECTED] wrote:
On 23 Nov 2006 18:20:17 +0100, Peter Dalgaard
There is likely some limitation in the Ryacas interface that needs to
be addressed by the Ryacas developers. yacas itself can support very large
numbers so just use yacas directly.
Aside from that I, as mentioned previously in this thread, yacas returns a
yacas object and that is a complex
the calculations are done
on the yacas side:
x - Sym(x)
Set(x, 2/3)
expression(2/3)
for(i in 1:400) Set(x, x * 2/3)
N(x)
expression(2.440085918e-71)
On 11/23/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
There is likely some limitation in the Ryacas interface that needs to
be addressed
If x is the object at the end of your post:
library(zoo)
z - zoo(x$Freq, as.Date(x$Var1))
aggregate(z, as.yearmon, length)
If out contains the result of aggregate then coredata(out) are the
counts and time(out) are the corresponding year-months.
See ?yearmon
On 11/22/06, antonio rodriguez
Read the help desk article in R News 4/1.
On 11/22/06, James J. Roper [EMAIL PROTECTED] wrote:
Dear all,
I often use dates and times in analyses. I just can't figure out how to
format my date or time column in R. So, apparently R sees the date as
something other than date (character).
, Paul Smith [EMAIL PROTECTED] wrote:
On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
Checkout the INSTALLATION - UNIX and TROUBLESHOOTING
sections of the home page:
http://code.google.com/p/ryacas/
I have just installed the package Ryacas, but getting the following
in the first place.
Also check which version of Ryacas you are using.
On 11/19/06, Paul Smith [EMAIL PROTECTED] wrote:
On 19 Nov 2006 16:11:52 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote:
Paul Smith [EMAIL PROTECTED] writes:
On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote
On 11/19/06, Paul Smith [EMAIL PROTECTED] wrote:
On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
Sorry but there is not much else I can tell you. I don't have a UNIX system
myself though I do know that others have used Ryacas on UNIX since the notes
on the home page are based
Try this:
a - matrix(1:3, 4, 5)
a.ag - aggregate(1:nrow(a), as.data.frame(a), length)
a.ag[which.max(a.ag$x), 1:ncol(a)]
On 11/19/06, kone [EMAIL PROTECTED] wrote:
Hi,
How do you get the most common row from a matrix? If I have a matrix
like this
array(1:3,dim=c(4,5))
[,1] [,2]
Try a test in which you replace the function calls with inline
code and compare the two speed-wise. You may very well
find that the difference is inconsequential.
On 11/19/06, Wee-Jin Goh [EMAIL PROTECTED] wrote:
Greetings list,
In my code, I have a few small functions that are called very
Thanks, Marc. I have placed a link to your post on the Ryacas home page.
Also, Ryacas 0.2-3 is now on Omegahat (as well as google groups).
On 11/19/06, Marc Schwartz [EMAIL PROTECTED] wrote:
OK, after digging around for a couple of hours on this, thinking that
this might be a
?
On 11/19/06, Paul Smith [EMAIL PROTECTED] wrote:
On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
Thanks, Marc. I have placed a link to your post on the Ryacas home page.
Also, Ryacas 0.2-3 is now on Omegahat (as well as google groups).
Apparently, the link
HowTo - Enable Telnet
I had an offline discussion with the Debian user and he indicated that
the yacas invocation string was his problem and not telnet at all so I will
remove that HowTo as it is indeed misleading.
On 11/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
I don't have a UNIX box but my reading
Patched (2006-11-16 r39921)
i386-apple-darwin8.8.1
locale:
C
attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base
other attached packages:
MASS lattice
7.2-29 0.14-13
best,
ken
Gabor Grothendieck wrote:
Please provide
r39722)
On 11/18/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
This works for me in terms of giving results without error messages
except for the confint(dd.plin) which I assume you don't really need anyways.
gg - model.matrix(~ Gun/GL - Gun, dd)
dd.plin - nls(Lum ~ gg^gamm, dd, start
Checkout the INSTALLATION - UNIX and TROUBLESHOOTING
sections of the home page:
http://code.google.com/p/ryacas/
On 11/18/06, Paul Smith [EMAIL PROTECTED] wrote:
Dear All
I have just installed the package Ryacas, but getting the following:
library(Ryacas)
Loading required package: XML
Try:
axis(1, 0.5, tick = TRUE)
On 11/18/06, zhijie zhang [EMAIL PROTECTED] wrote:
Dear Ruser,
I use abline() function to add the reference line successfully, but i
can't display the values corresponding to the reference line on the x/y
axis, anybody knows how to display it?
*My simulated
On 11/17/06, Paul Smith [EMAIL PROTECTED] wrote:
On 11/16/06, Prof Brian Ripley [EMAIL PROTECTED] wrote:
For my calculations, I am needing to use more floating-point precision
than the default one of R. Is that possible? And, if yes, how?
See package gmp (but that will be slow and
You might use the idea below together with sum.exact in the caTools package.
On 11/17/06, Martin Maechler [EMAIL PROTECTED] wrote:
Paul == Paul Smith [EMAIL PROTECTED]
on Fri, 17 Nov 2006 12:12:52 + writes:
Paul On 11/16/06, Prof Brian Ripley [EMAIL PROTECTED]
Paul wrote:
On 17 Nov 2006 15:59:24 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote:
Robin Hankin [EMAIL PROTECTED] writes:
On 17 Nov 2006, at 14:14, Peter Dalgaard wrote:
[snip]
so a+b+c is really (a+b)+c and I was calculating a+(b+c). That's
actually a little bit harder because you don't
I did not realize that ++ was available. Is there a comprehensive list
somewhere of which operators are available for definition? I searched
the R Language manual for ++ but that only came up with a reference to C++ .
On 17 Nov 2006 11:38:43 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote:
Try this where vf is the output of your format statement:
gsub([.]\\B, , vf)
Actually I was surprised at this as my reading of ?regex suggests it
should have been \\b but when that did not work I tried \\B and that
did work.I am using
R version 2.4.0 Patched (2006-10-24 r39722)
on Windows
Please provide reproducible code which shows the error.
dd - structure(list(Lum = c(0.15, 0.07, 0.1, 0.19, 0.4, 0.73, 1.2,
+ 1.85, 2.91, 3.74, 5.08, 6.43, 8.06, 9.84, 12, 14.2, 16.6, 0.1,
+ 0.1, 0.17, 0.46, 1.08, 2.22, 3.74, 5.79, 8.36, 11.6, 15.4, 19.9,
+ 24.6, 30.4, 36.1, 43, 49.9, 0.06, 0.06,
Use
distribute.type = TRUE
or
panel = panel.superpose.2.
as an argument to xyuplot. e.g. Using the builtin anscombe data set:
xyplot(y1 + y2 ~ x1, anscombe, type = c(p, l), distribute.type = TRUE)
# same
xyplot(y1 + y2 ~ x1, anscombe, type = c(p, l), panel = panel.superpose.2)
On
You must be thinking of some other language:
is.integer(1)
[1] FALSE
On 11/17/06, Andrew Robinson [EMAIL PROTECTED] wrote:
Nice solution.
I believe that showing the decimal point is correct. It demonstrates
that the number is not an integer.
Cheers
Andrew
On Fri, Nov 17, 2006 at
Never used it but if you look down the check list on Windows:
http://cran.r-project.org/bin/windows/contrib/checkSummaryWin.html
for RBloomberg we see it has an error in attempting to access one of its
dependent packages. See if building it yourself or going back to R 2.3.1
helps.
On
Try this:
tb1 - tb2 - tb3 - matrix(1:100, 10, 10, dim = list(NULL,
LETTERS[1:10]))
head(tb1)
lis - c(tb1, tb2, tb3)
for(d in lis) colnames(.GlobalEnv[[d]]) - tolower(colnames(.GlobalEnv[[d]]))
head(tb1)
lis - list(tb1 = data.frame(1:100, 10, dim = list(NULL, LETTERS[1:10]), 3)
lis -
1. Another way to address this is to include g in the type vector:
xyplot(Sepal.Length + Sepal.Width ~ Petal.Length ,
data = iris, allow.multiple = TRUE, scales = same, type = c(l, g))
2. Also look in the example section of:
library(zoo)
?xyplot.zoo
which gives an example of plotting a
Marc's solution looks a bit easier but here are a few more anyways:
# 1
reshape(DF, dir = wide, timevar = Gender, idvar = Major)
# 2
library(reshape)
DFm - melt(DF, id = 1:2)
cast(DFm, Major ~ Gender, fun = mean)
On 11/15/06, Christian Convey [EMAIL PROTECTED] wrote:
Thanks, let me try to
Try:
V1 - c(Welfare_Group_1024, Welfare_Group_1536, Welfare_Group_160)
V2 - c(xxxWelfare_Group_1024, yWelfare_Group_1536,
zWelfare_Group_160)
lcs - function(ff) { L - ff[1]; for(f in ff) L - lcs2(f,L); L }
lcs(V1)
lcs(V2)
where lcs2 was posted here:
A workaround if you need to multiply an its object by a number would
be to convert the its object to zoo, do the multiply on the zoo object
and then convert the resulting zoo object back to its. Using im from
Martin's example:
library(its)
library(zoo)
im
as.its(3 * as.zoo(im))
On 11/14/06,
First, read the last line of every message to r-help. The code below
is not self contained nor reproducible.
You can only put a column name on a zoo object that has columns!
That means its data portion must be an nx1 matrix, not a vector.
On 11/14/06, Leeds, Mark (IED) [EMAIL PROTECTED] wrote:
Unfortunately that's wrong. Look at ?zoo . The first
argument must be a numeric vector, matrix or factor. A data
frame is not allowed.
On 11/14/06, Horace Tso [EMAIL PROTECTED] wrote:
Mark, it's not the most elegant solution but here it is,
I have a zoo with a vector of numeric values,
Please make your examples minimal. That includes not using
huge variable names that make it harder to work with.
This is not a zoo object with one column. Its is a zoo object
based on a vector.
zoo(matrix(1:3, 3, 1))
is not the same as
zoo(1:3)
The former has one column but the latter does
On 11/13/06, Roger Bivand [EMAIL PROTECTED] wrote:
On Mon, 13 Nov 2006, Luiz Rodrigo Tozzi wrote:
Hi
I want to know if there is any possibility of executing the content of a
vector, for example:
example=c(Test,1,0,0,0,seq(14,42,by=2),0,0,1)
i want to know if there is anything
Here are a couple of possibilities:
as.data.frame(t(t(df) * vct))
df * rep(vct, each = nrow(df))
On 11/13/06, RDM [EMAIL PROTECTED] wrote:
# Newbie alert
# I am wanting to multiply the rows in a dataframe by a vector.
# However, the default behavior appears to be for the vector to be
This is slightly faster but not by much:
ad - function(m, a) { diag(m) - diag(m) + a; m }
R - ad(P %*% P - t(P) - P, 1)
On 11/12/06, YONGWAN CHUN [EMAIL PROTECTED] wrote:
Hello,
I wonder by chance if there is a way to reduce computing time for matrix
addition or subtraction. With a lot of
Try this:
plot(0, main = quote(P(X ~ | ~ A ~ intersect(B
On 11/10/06, stortignauz [EMAIL PROTECTED] wrote:
Hi all,
I'm trying to write an axis label
that sounds P( X | K and Xb ) (probability of X given K and Xb )
but I need the intersection symbol
(the \cap in latex)
Actually I
You are using two different x's and one has nothing to do with the other.
All of your examples are simply internally inconsistent so there is no
reason to think they would work.
On 11/9/06, Carmen Meier [EMAIL PROTECTED] wrote:
Gabor Grothendieck schrieb:
Please provide a complete self
Aside from the answers to use text you could use letters instead of
numbers which would allow you to continue to use a single character
and might have advantages in terms of saving space on the chart:
pch = letters[trial_no]
pch = c(letters, LETTERS)[trial_no]
pch = c(1:9, letters,
Try:
legend(topleft, expression(R[adj]^2 == 0.66))
On 11/9/06, CG Pettersson [EMAIL PROTECTED] wrote:
Dear all,
W2k, R2.4.0
I want to place a legend in a regression plot, stating the adjusted
R-square value. After some struggle with the coding I am nearly there, but
only nearly. The best
Try this:
plot(z, xaxt = n)
xt - paste(23, seq(5, 50, 5), sep = :)
axis(1, times(paste(xt, 0, sep = :)), xt)
On 11/8/06, Carmen Meier [EMAIL PROTECTED] wrote:
Hi to all,
I have some problems to get the times-scale to the x-axis the times are
coming from an excel sheet f. e
[1] 0:01:00
There is a discussion and code in the R News 4/1 help desk article.
On 11/8/06, Ivan Kalafatic [EMAIL PROTECTED] wrote:
Does anyone know where I can find any tool for Windows that converts
dates from ordinary formats into POSIX?
I need it to import sime time series from Excel into R and use
601 - 700 of 3333 matches
Mail list logo