Not the same data your using but...
# get something like a reasonable
# age dist for dummy data:
data('mw.ages', package='UsingR')
mw.age <- mw.ages[2:80,]
# size of dummy dataset
n.obs <- 1000
#pr of survival
pr.s <- 0.80
# dummy data
dat <- data.frame(
pclass=sample(c('1st', '2nd', '3rd')
hi all,
For my question in the first email below, I found I made a mistake on
my coding in the previous email, the one I was trying to type should
be
> grouped.titanic.df<-data.frame(group.age.group=sort(unique(titanic.df$age.group)),
+
expand.grid(sex=sort(unique(titanic.df$sex)),pclass=sort(un
hi all,
me again. i try to type the following coding for my question below,
but it comes up a error messgae. please advise whether the way i was
trying to do will solve my question stated in the previous email. If
so , please advise what is wrong with my coding.
(p.s. all the data are stored in xx
Hi there,
I am a newbie to R and just installed R 2.7.2 and JGR. As root, JGR
launch successfully both in R or by a launcher (a script in shell), but
it not works for non-root user. What's the cause of this issue?
sudo update-java-alternatives -s java-6-sun
sudo R CMD javareconf
sudo R
instal
This is a python not an R problem.
Use of redirection is handled by a shell, not by the executable (usually:
it could depend on the compiler). The Windows system and popen commands
(and hence R's system()) does not use a shell: POSIX OSes do.
It will be cleaner to use Rscript to run scripts.
'Rterm --help' shows the usage as:
Rterm [options] [< infile] [>outfile] [EnvVars]
just in case you didn't understand what the angle brackets meant:
the term "[< infile]" means "read input from 'infile'", and
the term "[> outfile]" means "write output to 'outfile'".
Though your code works at th
further more, my purpose for below questions is to assessthe effect
of class, age and sex on the survival.
Cheers.
-- Forwarded message --
From: andyer weng <[EMAIL PROTECTED]>
Date: 2008/10/18
Subject: Fwd: Categorial Response Questions
To: r-help@r-project.org
Sorry Guys, i
Check out the 'fancyvrb' latex package - that is quite flexible and I
wouldn't be surprised if it can help you. Make sure to read the docs
(fancyvrb.pdf).
/H
On Fri, Oct 17, 2008 at 8:37 PM, erwann rogard <[EMAIL PROTECTED]> wrote:
> Thanks for clarifying. Yes, \$ works in latex, but not *within
Hi,
Again I'm doing logistic regression using lrm from Harrell's Design
package, but on wide matrices (28 observations, 1891 variables) so L2
penalisation is used. I get the following error, although I've tried
different penalties and different tolerances. The X matrix is scaled and
centred.
Sorry Guys, i press the wrong button to send out the uncompleted message.
let me do it again.
I have a data set containing :
pclass: A factor giving the class of the passenger: one of 1st, 2nd, 3rd.
age: The age of the passenger in years.
sex: Passenger's gender: female or male
age.gr
Hi All,
I have a data set containing :
pclass: A factor giving the class of the passenger: one of 1st, 2nd, 3rd.
age The age of the passenger in years.
sex Passenger's gender: female or male
age.group Passengers age group, one of 0‐9 , 10‐19, 20‐29, 30‐39,
40‐49, 50‐59, 60‐69,
70‐79
survived Pass
Thanks for clarifying. Yes, \$ works in latex, but not *within* the
lstlisting environment.
On Fri, Oct 17, 2008 at 11:32 PM, Gabor Grothendieck <
[EMAIL PROTECTED]> wrote:
> Greg was referring to what to write in R character literals in order to
> generate
> a single \ in the output from R which
Greg was referring to what to write in R character literals in order to generate
a single \ in the output from R which in turn would be fed into latex or Sweave
and then latex. Google this: special characters in latex
On Fri, Oct 17, 2008 at 11:23 PM, erwann rogard <[EMAIL PROTECTED]> wrote:
> Th
Thanks, but unfortunately
\begin{lstlisting}
\\$
\end{lstlisting}
and
\begin{lstlisting}
$
\end{lstlisting}
still generate the same error.
On Fri, Oct 17, 2008 at 9:38 PM, Greg Snow <[EMAIL PROTECTED]> wrote:
> The $ is special in TeX/LaTeX as a shortcut for beginning/ending inline
> mat
The $ is special in TeX/LaTeX as a shortcut for beginning/ending inline math
mode, so if you want an actual $ then you need to escape it so that the
TeX/LaTeX file has \$ in it. This means that in your R code that generates the
file you may need \\$ or in some cases $.
Hope this helps,
--
Is this more what you want?
g1 <- rnorm(100, rep( c(50,100,150), c(25,50,25)), 10 )
g2 <- rnorm(135, rep( c(55,95,145), c(30,75,30)), 11 )
g3 <- rnorm(90, rep( c(45, 105, 150), c(30,40,20)), 9 )
tmp <- c(g1,g2,g3)
br <- hist(tmp, plot=FALSE)$breaks
mydata <- list(g1,g2,g3)
h <- t(sapply( mydat
Thanks Erik,
grid.lines() gives me exactly what I wanted.
Have a nice weekend!
Thomas
library(grid)
pdf("rect.pdf", paper="a4r")
grid.lines(x=c(1,1,3),c(1,2,2),default.units="cm")
grid.lines(x=c(1,1,3)+1,c(1,2,2)+0.5,default.units="cm",gp=gpar(col="blue"))
dev.off()
_
Dear Alex,
Just a _minor_ change in the function "powers":
# powers
# n is the number of samples
# DATA is the ORIGINAL data set
powers=function(n,m2,n2,s2,DATA){
outp=Sample(DATA,n) # DATA was 'name' before, which doesn't make
sense
mymeans=outp$Gmean
mysds=outp$Gsd
res=t(rbind(mymeans,m
Hi,
I'm trying to execute R-script from Python. I'm using R 2.7.2, Python 2.5
and WinXP.
I don't won't to use Python/R interface because of nature of project.
Python code :
import subprocess
command = 'c:\\Program Files\\R\\R-2.7.2\\bin\\Rterm.exe --vanilla -q
d:\\output.out'
subprocess.Popen(
hi,
here's what i have:
\lstset{
basicstyle=\ttfamily,
keywordstyle=\bfseries,
showstringspaces=false,
columns = fullflexible,
mathescape = true,
language=R
}
\begin{lstlisting}
lst$val<-val
\end{lstlisting}
./software.tex:16:Extra }, or forgotten \endgroup. lst$
the culprit here is
I'm with Stephen on that one, ggplot2 is one of the greatest graphics package
i've ever used. Hadley, you are the man, thanks for providing this great
package to the R community. By the way, your website is also nice and very
informative.
Felipe D. Carrillo
Supervisory Fishery Biologist
Dep
Dear Deepayan, Haris, and Baptiste,
Thank you !!!
Ferry
On Tue, Oct 14, 2008 at 10:06 AM, Deepayan Sarkar <[EMAIL PROTECTED]
> wrote:
> On 10/13/08, Ferry <[EMAIL PROTECTED]> wrote:
> > Dear R users,
> >
> > How to change lattice panel label/text from the automatically generated
> > label (ba
On Fri, Oct 17, 2008 at 3:50 PM, <[EMAIL PROTECTED]> wrote:
>
> Thanks for the gracious assistance in advance
>
> I'm working on a non-metric scaling problem and am calculating the distance
> for input to isoMDS
>
> Here is the code
>
> library(MASS)
> vegdata <- tapply(Percent, list(PRIMARY_VE, M
Oh ok, then that will be definitely in there for the next version
(which I'm aiming to release early November)
Hadley
On Fri, Oct 17, 2008 at 3:24 PM, stephen sefick <[EMAIL PROTECTED]> wrote:
> no, no, I want to facet on a variable and then have the plots stacked
> on top of each other with diff
On 17-Oct-08 17:59:55, Feldman, Ruben wrote:
> Hi,
> My data has time series for different variables and I want to predict
> "ctw" with the value of each other variable at that point in the
> series.
> I have run a logistic regression:
> logreg <- glm(ctw ~ age + OFICO + ... + CCombLTV, data=mydat
Try the following instead:
vegdata.dd[is.na(vegdata.dd)] <- 0.01
-Christos
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED]
> Sent: Friday, October 17, 2008 4:50 PM
> To: [EMAIL PROTECTED]
> Subject: [R] using ifelse with surpr
Thanks for the gracious assistance in advance
I'm working on a non-metric scaling problem and am calculating the distance
for input to isoMDS
Here is the code
library(MASS)
vegdata <- tapply(Percent, list(PRIMARY_VE, MASTERID), sum)
x.mat <- matrix(x, nrow=40, ncol=2750, byrow=TRUE, dimnames =
eric lee gmail.com> writes:
>
> Hi,
>
> I have data for one dependent variable and multiple independent variables
> y = b0 + b1*x1 + b2*x2 + ...
>
> I want to a list of all models that have some subset of the independents
> (just x1 x2, and not x3, etc.) and their corresponding BIC values. Is
Statistical Computing and Statistical Graphics Sections
American Statistical Association
Student Paper Competition 2009
The Statistical Computing and Statistical Graphics Sections of the ASA
are co-sponsoring a student paper competition on the topics of
Statistical Computing and Statistical Graph
no, no, I want to facet on a variable and then have the plots stacked
on top of each other with different scales. I have grown quite fond
of not having four different things on a plot all with different
scales- it is quite confusing. I may send you along an example when I
get to that point. I ha
Hi Stephen,
Thanks for the kind words about ggplot2 :)
The next version of ggplot2 will implement the equivalent of scale
relation free - I've just finished writing the bulk of the code and
now I'm getting all the edge cases working. However, what you
describe sounds like you want multiple scale
> You could consider modifying the code for gantt.chart in plotrix.
Not sure that I have the skills, but I was tempted when I found
plotrix earlier today, to see if it could be modified someway.
Thanks,
Graham
__
R-help@r-project.org mailing list
http
I don't know if there is a way to use the scale relation free argument
in ggplot2 like in lattice. I have a feeling that there is not, but I
would like to make a plea for this feature. It would be nice to be
able to plot Total Inorganic Nitrogen Total Phosphorus and the ratio
of the two- the num
You could consider modifying the code for gantt.chart in plotrix.
On Fri, Oct 17, 2008 at 3:22 PM, Graham Smith <[EMAIL PROTECTED]> wrote:
> I would like to produce a chart that looks like a Gantt chart (or
> shingle plot), but instead of tasks you have variable names and
> instead of start and fi
Dear Alex,
Try this:
# Data
name=read.table(textConnection("
X8 X9 X10 X102 X110 X177 X283 X284 X286 X292 X297 X306 X308 X314
0 1 000100000000
0 0 001000000010
0 1 0000000
Hi,
I have data for one dependent variable and multiple independent variables
y = b0 + b1*x1 + b2*x2 + ...
I want to a list of all models that have some subset of the independents
(just x1 x2, and not x3, etc.) and their corresponding BIC values. Is there
a pre-existing function that does this?
Thanks,
I will have a look at this.
Graham
2008/10/17 jim holtman <[EMAIL PROTECTED]>:
> ?segments
>
> segments will draw the lines for you, You can also use 'rect' for
> rectangles. So the functions are there to draw it, you just have to
> decide how you want it to look.
>
> On Fri, Oct 17, 2
?segments
segments will draw the lines for you, You can also use 'rect' for
rectangles. So the functions are there to draw it, you just have to
decide how you want it to look.
On Fri, Oct 17, 2008 at 3:22 PM, Graham Smith <[EMAIL PROTECTED]> wrote:
> I would like to produce a chart that looks l
I would like to produce a chart that looks like a Gantt chart (or
shingle plot), but instead of tasks you have variable names and
instead of start and finish dates you have an upper and lower numeric
value.
If that makes sense, is there an obvious way of doing this.
Thanks,
Graham
_
take a look at ?mapply(); for instance, you can use something like this
(untested):
dat <- Sample(...)
mapply(Power, dat$Gmean, dat$Gsd, MoreArgs = list(alfa = 0.05, m1 = 57,
s1 = 33, n1 = 200, n2 = 100))
I hope it helps.
Best,
Dimitris
Alex99 wrote:
Hi everyone,
I have dataset which I ma
here are two graphs from spss which may help illustrate my needs ;-)
http://pics.foruni.de/getimg/balken_time_one_censored.jpg
http://pics.foruni.de/getimg/one_time_sample0_censored.jpg
thanks a lot for your time and energy!
Regards
Greg Snow-2 wrote:
>
> I don't understand what you want,
try uniroot(), e.g.,
f <- function (x) x^2
uniroot(function(x, a) f(x) - a, c(0, 10), a = 4)
I hope it helps.
Best,
Dimitris
dennis11 wrote:
Hi,
Let's say very simply there is a function:
f <- function (x) x^2
which is evaluated with :
f(2)
Now, I want to do the reverse so I want to no
Hi,
My data has time series for different variables and I want to predict
"ctw" with the value of each other variable at that point in the series.
I have run a logistic regression:
logreg <- glm(ctw ~ age + OFICO + ... + CCombLTV, data=mydata,
family=binomial("logit"))
And I am trying to get a plo
Hi everyone,
I have dataset which I make a sample of it couple of times and each time I
get the mean and standard deviation of each row for each sample. I have a
function for that, which takes the name of the file and number of times to
sample and then returns the mean and standard deviation for e
Hi,
Let's say very simply there is a function:
f <- function (x) x^2
which is evaluated with :
f(2)
Now, I want to do the reverse so I want to now x for f(x) = 4
So, is there a way in R to solve x for some function f(x)=a?
I hope I explained it clear.
cheers,
Dennis
--
View this message
Can anyone shed any light on this topic for us?
I would like to attempt agglomerative clustering with a contiguity
constraint (a.k.a. intermediate linkage clustering), as described by
Legendre & Legendre (1998, page 697)
Is there any code kicking around for this type of analysis specifically?
Peter Dalgaard wrote:
Martin Privat wrote:
Simple question...
I would like to dump some summries of lm()'s to small seperate text
files.
I have looked at:
print(), but it don't support output to file
cat(), but it claims that 'sum1' is a list
write, but that just uses cat()...
The script goes
Hi,
When I do a conditional histogram of X by Y and my Y ranges 0-100,000 I
get the x axis bin labels in scientific notation.
0 to 2e+06 etc.
is there a way to view the histogram bins without scientific notation?
thanks
Dhruv
[[alternative HTML version deleted]]
___
Thank you all for quick responses,
This was very helpful. I knew there was a simple way!
--
Michal J. Figurski
Prof Brian Ripley wrote:
sprintf("%03d", 2)
formatC(2, width=3, flag="0")
both give
[1] "002"
On Fri, 17 Oct 2008, Michal Figurski wrote:
Hello R-helpers,
I have a problem with
sprintf("%03d", 2)
formatC(2, width=3, flag="0")
both give
[1] "002"
On Fri, 17 Oct 2008, Michal Figurski wrote:
Hello R-helpers,
I have a problem with formatting a single number to show leading zeros. For
example, I want "2" displayed as "002".
I hope you meant that you want 2, not "2",
On Fri, Oct 17, 2008 at 1:28 PM, Greg Snow <[EMAIL PROTECTED]> wrote:
> There is a package called RSVGTipsDevice who's description mentions
> hyperlinks. That sounds like a promising place to start.
Thanks, Greg. That looks pretty close.
Sean
>> -Original Message-
>> From: [EMAIL PROT
?sprintf
> x <- c(1,10,11,100)
> sprintf("%03d", x)
[1] "001" "010" "011" "100"
On Fri, Oct 17, 2008 at 1:55 PM, Michal Figurski
<[EMAIL PROTECTED]> wrote:
> Hello R-helpers,
>
> I have a problem with formatting a single number to show leading zeros. For
> example, I want "2" displayed as "002".
Hello R-helpers,
I have a problem with formatting a single number to show leading zeros.
For example, I want "2" displayed as "002".
My numbers have 1 to 3 digits and I would like them all to display 3
digits for printing. I know I could use "paste" in a loop with several
"if"s, but I was wo
There is a package called RSVGTipsDevice who's description mentions hyperlinks.
That sounds like a promising place to start.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
801.408.8111
> -Original Message-
> From: [EMAIL PROTECTED] [m
The plot.new function will start a new plot in the next frame, but not plot
anything. By default the coordinates go from 0 to 1 in both the x and y
directions.
Try:
> par(mfrow=c(2,2))
> boxplot(rnorm(100))
> boxplot(runif(100))
> boxplot(rexp(100, 1/3))
> plot.new()
> legend( 0,1, pch=1:3, le
There are some functions that will do this in 1 step, like matplot if the the
data is formatted properly. ggplot has already been mentioned as another
approach.
If you want to stick with base graphics, there is a zoomplot function in the
TeachingDemos package that will rescale a plot (zoom in
Is there a way to make SVG files containing links (for use in a
browser) using any of the R graphics packages or devices?
Thanks,
Sean
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide htt
And once you have all your variables of interest in a list, you can avoid the
explicit loop by using the Reduce function (which works for cases where you
have a function that takes 2 arguments and you want to apply it recursively to
more than 2):
> tmp <- list( a=1:10, b=5:15, c=20 )
> Reduce(
I don't understand what you want, do you want 3 different histograms on 1 plot?
Do you want it to look like a barplot with side by side bars (rather than
stacked)?
For labeling the colors, you can use the legend function to add a legend to a
plot, or you can use the text function to place text
Dear Ruben,
One reason might be that when you restarted R you didn't load again the car
package. Try loading it again after you restart R.
library(car)
?reg.line
reg.line(logreg,col=palette()[2], lwd=2, lty=1)
HTH,
Jorge
On Fri, Oct 17, 2008 at 11:18 AM, Feldman, Ruben <[EMAIL PROTECTED]>wrote
[EMAIL PROTECTED] wrote:
I'm presumably missing something very obvious, but how does one use the
key.opts argument in labcurve (via Ecdf)?
In this example, I want the key to be big and have a blue background, but
it isn't and doesn't.
ch <- rnorm(1000, 200, 40)
sex <- factor(sample(c('female
Hi,
I was trying to plot the logistic regression from a regression "logreg"
I just ran.
I downloaded the "car" package from the R website and went to Packages
-> install package from local zip file
I checked in my library file and the package is there. I restarted R.
I then ran the command:
reg.li
Achim Zeileis wrote:
On Thu, 16 Oct 2008, Paulo Cortez wrote:
Hi,
I want to save a RWeka model into a file, in order to retrive it
latter with a load function.
See this example:
library(RWeka)
NB <- make_Weka_classifier("weka/classifiers/bayes/NaiveBayes")
model<-NB(formula,data=data,...)
Thanks for the rapid response Deepayan -- that's what I was looking
for. Thanks also for your ongoing support of lattice, it's very much
appreciated!
Paul
Quoting Deepayan Sarkar <[EMAIL PROTECTED]>:
On 10/16/08, Paul Boutros <[EMAIL PROTECTED]> wrote:
Hello,
I have encountered some une
Or you can do it in one line (rnorm is vectorized):
DV <- rnorm( sum(n), rep(mu, each=n), rep(sigma, each=n) )
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
801.408.8111
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL P
Never mind, I got the brilliant idea to ls(pkgEnv) and of course it worked.
Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry
Indiana University School of Medicine
15032 Hunter Court, Westfield, IN 46074
(317) 490-5129 Work
I'm having trouble with a Bioconductor package, an variable expected in an
environment does not seem to be there. As part of my investigation of the
problem (most likely on my end) I'd like to list the variables contained in
an environment. If you have an environment loaded, lets call it "pkgEnv',
The default for this has been changed for R 2.8.0. The fix is also
available in 2.7.x:
(2.8.0:)
o The default for 'stylepath' in Sweave's (default) RweaveLatex
driver is now FALSE rather than TRUE if
SWEAVE_STYLEPATH_DEFAULT is unset : see ?RweaveLatex.
To support
I'm presumably missing something very obvious, but how does one use the
key.opts argument in labcurve (via Ecdf)?
In this example, I want the key to be big and have a blue background, but
it isn't and doesn't.
ch <- rnorm(1000, 200, 40)
sex <- factor(sample(c('female','male'), 1000, TRUE))
Ecdf
I am aware .First is a function, that should have been apparent from by my
use of .First(). I expect .First to be loaded from .RData as it indeed does
exist (as I had confirmed before I posted to R-help). If, after starting
R.app, I type .First() the function executes as expected, however I wish to
Plot fit.
When I plot fit and I have node splits on lengthy conditions (like
State= 1, or State =2 etc is too long and looks ugly).
-Original Message-
From: Terry Therneau [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2008 10:07 AM
To: r-help@r-project.org
Cc: Sharma, Dhruv
Subje
fit <- rpart(
Are you asking about print(fit), summary(fit), or plot(fit)?
Terry Therneau
__
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/post
On 10/17/2008 9:24 AM, Thompson, David (MNR) wrote:
(Question/suggestion inline below)
-Original Message-
From: Duncan Murdoch [mailto:[EMAIL PROTECTED]
Sent: October 16, 2008 02:17 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [R] package Utils Sweave Example Error
On
Hi all,
I divide the graphical device into 4 ---mfrow=c(2,2)--- to plot 3 boxplots
graph.
Thus I get an empty space for the fourth graph. I d'like to place a legend
in this space.
legend() creates a legend in the last graph (the 3rd) I'd like a legend
in the empty space.
How may I do it?
On Fri, 17 Oct 2008, Jonsen, Ian wrote:
Hi,
I am having problems using .First() with the Mac OS X gui version of R 2.7.2
(under OS X 10.5.5); .First is ignored on startup. .First() does work in the
command-line version of R under Mac OS X but my specific task requires the
gui version. I can fin
(Question/suggestion inline below)
>-Original Message-
>From: Duncan Murdoch [mailto:[EMAIL PROTECTED]
>Sent: October 16, 2008 02:17 PM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: Re: [R] package Utils Sweave Example Error
>
>On 10/16/2008 12:19 PM, Felipe Carrillo wrote:
>>
Dear all,
Does anyone know how to overlay a 3d line on a wireframe plot? I would also
like to be able to keep the legend that you get when using the option:
drape = TRUE
when using the option: shade = TRUE.
In addition, I would like to know how to keep the axes while getting rid of
the box, I u
Use lattice or ggplot
__
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 commented, minimal, self-contained, reproducible code.
Hi,
I am having problems using .First() with the Mac OS X gui version of R 2.7.2
(under OS X 10.5.5); .First is ignored on startup. .First() does work in the
command-line version of R under Mac OS X but my specific task requires the
gui version. I can find no reference to this issue in the Mac OS
Martin Privat wrote:
> Simple question...
>
> I would like to dump some summries of lm()'s to small seperate text
> files.
>
> I have looked at:
> print(), but it don't support output to file
> cat(), but it claims that 'sum1' is a list
> write, but that just uses cat()...
>
> The script goes somet
?capture.output
?sink
On Fri, Oct 17, 2008 at 8:16 AM, Martin Privat <[EMAIL PROTECTED]> wrote:
> Simple question...
>
> I would like to dump some summries of lm()'s to small seperate text files.
>
> I have looked at:
> print(), but it don't support output to file
> cat(), but it claims that 'sum1
Simple question...
I would like to dump some summries of lm()'s to small seperate text files.
I have looked at:
print(), but it don't support output to file
cat(), but it claims that 'sum1' is a list
write, but that just uses cat()...
The script goes something like this:
...
lmMax <- lm(NUMAMM
Leon Yee wrote:
> But the problem is that I have MANY vectors, whose names are of some
> specific pattern. It is not good for us to write a very long expression.
>
> vectors <- list(ls(pattern="xyz")) didn't get what I want.
then you could mix the two approaches:
vectors = lapply(ls(pattern="xyz
On Fri, Oct 17, 2008 at 4:31 AM, Ted Harding
<[EMAIL PROTECTED]> wrote:
> On 17-Oct-08 09:01:08, Benoit Boulinguiez wrote:
>> Hi,
>> Personally I always use xlim and ylim with the plot or points
>> function like that:
>>
>> plot( X,Y,pch=16,col=2,cex.axis=1.5,cex.lab=1.5,
>> xlim=c(0,1.05*max
But the problem is that I have MANY vectors, whose names are of some
specific pattern. It is not good for us to write a very long expression.
vectors <- list(ls(pattern="xyz")) didn't get what I want.
Leon
Wacek Kusnierczyk wrote:
... but it seems to me a better solution to have the vectors
... but it seems to me a better solution to have the vectors you need in
a list, and then iterate over the list, rather than have to look the
vectors up by name:
vectors = list(v1, v2, 1:10, ...)
u = NULL
for (v in vectors) u = union(u, v)
when you use get, you start to explicitly play with envir
Lavan wrote:
Dear R users,
I have two uniform random variables and I need to estimate the joint
density. I like to know whether
there is any package which estimates bivariate uniform densities.
There's a package called "copula" which might do what you want.
Duncan Murdoch
___
Cool! It works!
Thank you very much!
Leon
Yihui Xie wrote:
You need to get() their elements instead of merely using variable names.
Regards,
Yihui
--
Yihui Xie <[EMAIL PROTECTED]>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School
try() worked perfectly. Thanks!
Helen
jim holtman wrote:
> ?try
>
> On Thu, Oct 16, 2008 at 4:46 PM, hgreatrex <[EMAIL PROTECTED]> wrote:
>
>> Hi,
>>
>> Is there any way that I can supress error messages so that they don't stop
>> for loops running?
>>
>> I'm using the gstat package and have c
Leon Yee wrote:
> Dear all,
>
>I have a question about "union". "union" handles two vectors'
> elements to get their union, but I have many vectors and I want to get
> the union of all of them. So I wrote a loop:
>
> all <-c();
> for(var in ls(pattern="xyz"))
> # all of the vectors with patter
You need to get() their elements instead of merely using variable names.
Regards,
Yihui
--
Yihui Xie <[EMAIL PROTECTED]>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin Universit
Dear all,
I have a question about "union". "union" handles two vectors'
elements to get their union, but I have many vectors and I want to get
the union of all of them. So I wrote a loop:
all <-c();
for(var in ls(pattern="xyz"))
# all of the vectors with pattern of "xyz"
{
all <- union
it might be that for some purposes non-resizing graphs are useful;
perhaps a graphical parameter that would allow the user to specify
whether the plot is to be automatically resized or not would be useful,
e.g.,
plot(..., resizable=T)
and then points(...) would cause the plot to adapt the scale.
Dear all,
I have here a difficult problem: We are currently analysing data from a biodiversity experiment,
where the following models are compared using AICc:
a) y ~ plant.diversity
b) y ~ plant.biomass
c) y ~ plant.diversity + plant.biomass
The problem now is that plant.diversity and plant.b
first of all: thank you for your replies!
hadley wrote:
>
> On Thu, Oct 16, 2008 at 11:42 AM, x0rr0x <[EMAIL PROTECTED]> wrote:
>>
>> Hi all,
>>
>> I'm trying to create a histogram which shows the frequency of variables
>> within a certain timeframe.
>>
>> I've been using SPSS before, but I did
On 17-Oct-08 09:01:08, Benoit Boulinguiez wrote:
> Hi,
> Personally I always use xlim and ylim with the plot or points
> function like that:
>
> plot( X,Y,pch=16,col=2,cex.axis=1.5,cex.lab=1.5,
> xlim=c(0,1.05*max(X)),ylim=c(0,1.05*max(Y))
> )
>
> Regards/Cordialement
> Benoit Bouling
kdebusk wrote:
What test do I use to determine if there is a correlation between a
discrete variable and a continuous variable?
For example - I have water quality ratings for streams (excellent,
good, fair, poor) and a corresponding nitrogen concentration for each
rating. I want to know if the t
Thank you Phil, Bernardo and Jorge for all your help. All your suggested
options work very well !
Regards
Himanshu
\\
On Fri, Oct 17, 2008 at 5:01 AM, Bernardo Rangel Tura
<[EMAIL PROTECTED]>wrote:
> Em Qui, 2008-10-16 às 22:31 +0200, Himanshu Ardawatia escreveu:
> > Hello,
> >
> > I am running
Hi,
Personally I always use xlim and ylim with the plot or points function like
that:
plot( X,Y,pch=16,col=2,cex.axis=1.5,cex.lab=1.5,
xlim=c(0,1.05*max(X)),ylim=c(0,1.05*max(Y))
)
Regards/Cordialement
Benoit Boulinguiez
-Message d'origine-
De : [EMAIL PROTECTED]
Hi all,
The pre-installed Windows Vista 64-bit in my new laptop does not
support Gap Light Analyzer. Has anyone used R to analyze hemispheric
photos and calculate % canopy openness, LAI, etc.? Which package can
be used for that? Thanks a lot!
Ophelia
_
1 - 100 of 103 matches
Mail list logo