Jim Porzak wrote:
Hello R Helpers,
Before setting up a connection with RODBC, I would like to present my
users with a pick list of ODBC data sources available in their
environment. I may be missing something, but don't see anything in
RODBC itself to return list of sources for use in
Dear list readers,
Can someone of you explain this behavior. Here's a toy example:
Start by constructing a function tmp
fix(tmp)
In the default editor enter this one-liner:
hist(rnorm(10))
close the editor and run environment on the function.
environment(tmp)
environment: R_GlobalEnv
On Mon, 22 May 2006, Jim Porzak wrote:
Hello R Helpers,
Before setting up a connection with RODBC, I would like to present my
users with a pick list of ODBC data sources available in their
environment. I may be missing something, but don't see anything in
RODBC itself to return list of
Your R-patched is nearly a month old. For 2.3.1 beta:
o edit() would default the environment of a function to .BaseEnv,
instead of to .GlobalEnv.
so this is already changed in the current test versions of the next
release of R.
On Tue, 23 May 2006, Hans Gardfjell wrote:
Dear
Hans Gardfjell wrote:
Dear list readers,
Can someone of you explain this behavior. Here's a toy example:
Start by constructing a function tmp
fix(tmp)
In the default editor enter this one-liner:
hist(rnorm(10))
close the editor and run environment on the function.
From ?nls
data: an optional data frame in which to evaluate the variables in
'formula'.
From the printout of 'Temp' it appears 'Temp' is a matrix. Assuming
'temp' is the same as 'Temp', it is not a data frame as required, and the
message is consistent with feeding eval() a
(this after asking the package author)
Hi
I cannot install the rmvnorm package under R-2.3.0, or R-2.3.1 beta.
It installs fine under R-2.2.1.
transcript for installation under R-2.3.0 follows.
Robin-Hankins-Computer:~/scratch% R --version
R version 2.3.0 (2006-04-24)
Copyright (C) 2006 R
On Mon, 22 May 2006, Frank E Harrell Jr wrote:
Rick Bilonick wrote:
When I run lrm from the Design package, I get a warning about
contrasts when I include an ordinal variable:
Warning message:
Variable ordfac is an ordered factor.
You should set
On Saturday 20 May 2006 20:14, Uwe Ligges wrote:
Richard M. Heiberger wrote:
[...]
1. cygwin is not supported.
2. Access is denied suggests this is not an R but a problem of your
(OS/cygwin ? ) setup.
Uwe Ligges
I also thank you for the answer. The problem seem to have vanished (and I
Hi,
I am using optim to estimate the parameters of a smooth transition
autoregressive model. I wrote a function to return the gradient for
each observation. So, for k parameters and n observations my function
returns a (n x k) matrix. The gr argument of optim expects a (k x 1)
vector. Now,
On Tue, 23 May 2006, Mehmet Balcilar wrote:
Hi,
I am using optim to estimate the parameters of a smooth transition
autoregressive model. I wrote a function to return the gradient for
each observation. So, for k parameters and n observations my function
returns a (n x k) matrix. The gr
Hello everyone.
After some very welcome offline advice, I now have the mvtnorm
package working on R-2.3.0; here is my solution for
MacOSX.
There were two problems: first, make could not find gcc-4.0.
To solve this, add the relevant directory to PATH. For me, this is
I guess I just need to sum over observations.
Here are my functions:
#
# function to compute gradient vector of the two-regime LSTAR model
#
dlogistic - function(theta,x,z,g.scale)
{
n = nrow(x)
k
G'day Duncan,
DM == Duncan Murdoch [EMAIL PROTECTED] writes:
DM On 5/22/2006 3:55 AM, Berwin A Turlach wrote:
I agree with you on this. Probably I was to terse in my
writing and produced misunderstandings. I never intended to
say something about the rights that the user
Hi I am trying to read and restructure some ascii data. Each row of data
consists of 543 ascii characters - the values of which are integers. I
would like to the read the following data only in to a dataframe - (a)
the first 8 digits - which represent one variable; and (b) the last 9
variables
G'day Deepayan,
DS == Deepayan Sarkar [EMAIL PROTECTED] writes:
DS On 5/22/06, Berwin A Turlach [EMAIL PROTECTED] wrote:
DS [...]
[...] Should perhaps better be formulated as:
My understanding was that in that moment a product was created
that would have to be
__
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-guide.html
Dear R-users:
Sorry for the naiveness of my question but I have been trying in the
R-help and the CRAN website without any success. I am trying to perform
a regression through the origin (without intercept) and my main concern
is about its evaluative statistics. It is clear for me that R squared
Hi,
I'm trying to add points to 2 plots on the fly using par(mfg=vector)
so switch between them. However, the appropriate scales aren't
switched when changing from one plot to another, e.g.
par(mfcol=c(2,1))
plot(1,1, col=blue)# blue plot
plot(1.2,1.2, col=red) # red plot
On Tue, 23 May 2006, Yan Wong wrote:
Hi,
I'm trying to add points to 2 plots on the fly using par(mfg=vector)
so switch between them. However, the appropriate scales aren't
switched when changing from one plot to another, e.g.
par(mfcol=c(2,1))
plot(1,1, col=blue)# blue plot
Hi,
a first step to answer your question: Regression through the origin (=
without intercept) can be done by explicitly stating in the 'formula'
argument '-1'
If you check the help page of 'lm' for example:
help(lm)
It will say in the 'Details' section:
A formula has an implied intercept term.
Trujillo L. skreiv:
Sorry for the naiveness of my question but I have been trying in the
R-help and the CRAN website without any success. I am trying to perform
a regression through the origin (without intercept) and my main concern
is about its evaluative statistics. It is clear for me that
Prof Brian Ripley wrote:
On Mon, 22 May 2006, Frank E Harrell Jr wrote:
Rick Bilonick wrote:
When I run lrm from the Design package, I get a warning about
contrasts when I include an ordinal variable:
Warning message:
Variable ordfac is an ordered factor.
You should set
On 23 May 2006, at 12:48, Prof Brian Ripley wrote:
On Tue, 23 May 2006, Yan Wong wrote:
if not, can anyone suggest a way of appending to 2
separate plots on the fly.
No, it is user error. par(mfg=) specifies where the next figure
will the drawn, and points() does not draw a figure but
Hello,
we work in nlme, with R version 2.2.1.
We ran the follwing sentence, a growth function,
formula(my data.gd)
L.gd ~ Largo | ID
Rich- function(Largo, Linf, K, t0, m)
Linf *(1-exp(-K(edad-t0)))^(1/(1-m))
Rich.nlme - nlme(Largo ~ Rich(edad, Linf, K, t0,
m),
+ data = L.gd,
+ fixed
Hi,
I want to flatten a list:
flatten(list(a=1,b=2),list(c=3,d=4)) - L - list(a=1,b=2,c=3,d=4)
which is
L
$a
[1] 1
$b
[1] 2
$c
[1] 3
$d
[1] 4
L[1]
$a
[1] 1
L[[1]]
[1] 1
What I used so far is
M - unlist(c(list(a=1,b=2),list(c=3,d=4))), but this gives
M
a b c d
1 2 3 4
M[1]
a
1
Hello R Helpers
I want to use string kernel by ksvm.
Is there an error in my operation?
1)dataset
test data
aaa 1
abb -1
bbb 1
2)operation
library(kernlab)
x-c(aaa,abb,bbb)
x
[1] aaa abb bbb
class(x)
[1] character
xl-list(x)
y-c(1,-1,1)
y
[1] 1 -1 1
z-list(x,y)
z
How about using c() ?
c(list(a=1,b=2),list(c=3,d=4)) - L
L
L
$a
[1] 1
$b
[1] 2
$c
[1] 3
$d
[1] 4
is.list(L)
[1] TRUE
How true of a list do you want? (-;
Hth, ingmar
From: Christian Hoffmann [EMAIL PROTECTED]
Date: Tue, 23 May 2006 14:11:01 +0200
To: r-help@stat.math.ethz.ch
Subject:
Greetings:
Using 'identify' to label points on a plot works just fine. However, when
saving under 'metafile' or using the clipboard the labels dissapear. I
believe it's an SDI issue. I am running last R with last Tinn-r under XP up
to date. Anything I can do besides going back to MDI :-)?
On 5/23/2006 8:49 AM, Mihai Nica wrote:
Greetings:
Using 'identify' to label points on a plot works just fine. However, when
saving under 'metafile' or using the clipboard the labels dissapear. I
believe it's an SDI issue. I am running last R with last Tinn-r under XP up
to date. Anything
On 5/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
I came across this one:
http://www.nysun.com/article/32787
which says that the violent death rate in Iraq (which presumably
includes violent deaths from the war) is lower than the violent
death rate in major American cities.
Does
Note that the reference to icasualty.com should be icasualty.org.
On 5/23/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
On 5/19/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
I came across this one:
http://www.nysun.com/article/32787
which says that the violent death rate in Iraq
Thanks Tony. That solved a huge part of what I was trying to do.
I was going through the trellis documentation (Bell labs) too. Is there any
other documentation/manual that you would recommend.
many thanks!
Tim
Tony [EMAIL PROTECTED] wrote:
On Mon, 2006-05-22 at 18:36 -0700,
Hi,
What are methods for identifying the right distribution for the dataset? As
far as I know Fisher test (p alpha) for stat. significance or min(square
error) are two criteria for deciding. What are the other alternatives? -
CONFIDENCE INTERVAL?. If any, how can I accomplish them in R.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Robin,
Thanks for the tip.
I already had gcc in my path, but also had to add the -lgfortran line
in Makevars.
Worked as you said.
Cheers
Robert
On May 23, 2006, at 1:57 AM, Robin Hankin wrote:
Hello everyone.
After some very welcome
Hi,
n = 1000
L = list(a=integer(n), b=integer(n))
L[[2]][1:10] gives me the first 10 items of the 2nd vector in the list L.
It works fine. However it appears to copy the entire L[[2]] vector in
memory first, before subsetting it. It seems reasonable that [[ can't
know that all that is to
The following works for my quick tests, but being undocumented it is
not guarenteed to work for all situations.
The best thing to do is to create the first plot, add everything to the
first plot that you need to, then go on to the 2nd plot, etc. If you
really need to go back to the first plot
On 5/23/06, Berwin A Turlach [EMAIL PROTECTED] wrote:
G'day Deepayan,
DS == Deepayan Sarkar [EMAIL PROTECTED] writes:
DS I think you are still missing the point. [...]
Quite possible, as I said early on IANAL. And these discussion really
starts to remind me too much of those that I
On Tue, 23 May 2006, Matthew Dowle wrote:
Hi,
n = 1000
L = list(a=integer(n), b=integer(n))
L[[2]][1:10] gives me the first 10 items of the 2nd vector in the list L.
It works fine. However it appears to copy the entire L[[2]] vector in
memory first, before subsetting it. It seems
Hi,
Probably a trivial question: if you do type something like:
out-nls( here goes the model ),
then you can type out or summary(out) to see the fitted
parameters, the quality of the fit etc...
but what if you want to get the fitted parameters as a vector to
re-use them straight away in the
LI == Lorenzo Isella [EMAIL PROTECTED] writes:
LI Hi, Probably a trivial question: if you do type something
LI like: out-nls( here goes the model ), then you can type out
LI or summary(out) to see the fitted parameters, the quality of
LI the fit etc... but what if you want to
On 23 May 2006, at 15:57, Greg Snow wrote:
The best thing to do is to create the first plot, add everything to
the
first plot that you need to, then go on to the 2nd plot, etc.
Yes, I realise that. The problem is that the data are being simulated
on the fly, and I wish to display
How can I compute a power analysis on a multi-factor within-subjects
design?
__
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-guide.html
Thanks.
I looked some more and found that L$b[1:10] doesn't seem to copy L$b. If
that's correct why does L[[2]][1:10] copy L[[2]] ?
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: 23 May 2006 16:23
To: Matthew Dowle
Cc: 'r-help@stat.math.ethz.ch'
Dear List,
Some of you have been following the discussion of the GPL and its inclusion
in the glmmADMB package we created for R users. I would like to provide
a bit of background and include an email we received from
Prof. Ripley so that everyone can be aware of how some might use the
GPL to try
Dear expeRts,
I am currently struggling with the problem of finding
cut points for a set of stimulus variables. I would like
to obtain cut points iteratively for each variable by
re-applying a dichotomised variable in the model and then
recalculate it. I planned to have fixed names for the
On 5/23/06, Matthew Dowle [EMAIL PROTECTED] wrote:
Hi,
n = 1000
L = list(a=integer(n), b=integer(n))
L[[2]][1:10] gives me the first 10 items of the 2nd vector in the list L.
It works fine. However it appears to copy the entire L[[2]] vector in
memory first, before subsetting it.
For other than the basic situations I generally use simulation to
estimate power. Follow these basics steps:
Write a function that takes as input the things that you may want to
change in estimating power (sample size, effect size, standard
deviations, ...). Inside the function generate random
On 5/23/06, Matthew Dowle [EMAIL PROTECTED] wrote:
Thanks.
I looked some more and found that L$b[1:10] doesn't seem to copy L$b. If
that's correct why does L[[2]][1:10] copy L[[2]] ?
I forgot, this is probably what I was told in discussion about
UseMethod($) the other day: The $ operator is
On Tue, 23 May 2006, Henrik Bengtsson wrote:
On 5/23/06, Matthew Dowle [EMAIL PROTECTED] wrote:
Thanks.
I looked some more and found that L$b[1:10] doesn't seem to copy L$b. If
that's correct why does L[[2]][1:10] copy L[[2]] ?
I forgot, this is probably what I was told in discussion
That development sounds excellent. I'm happy to help test it, just let me
know.
Until 2.4.0 then I'll do something like the following, because I need to
deal with list integer locations rather than names :
eval(parse(text=paste(L$',names(L)[2],'[1:10],sep=)))
This works well but if
Hi,
I am interested in obtaining estimate of population mean density of a
certain area by using kridging. I can get the predicted values at
individual locations. I suppose that I can obtain estimate of
population density by averaging those individual predicted values, but
how about the se of
Macro stuff à la SAS is something that should be avoided whenever
possible - it's messy, limited, and limiting. (I've done it
ocasionally and it works, but I think it's best not to go there.) Read
the documentation on lists (in particular named lists), and keep
everything in one or more lists. For
Johannes Hüsing [EMAIL PROTECTED] writes:
Dear expeRts,
I am currently struggling with the problem of finding
cut points for a set of stimulus variables. I would like
to obtain cut points iteratively for each variable by
re-applying a dichotomised variable in the model and then
recalculate
Its not entirely clear to me what you want to do but these will
do the indicated regression on the subset of the data for which
Species is setosa and then do it again but for the subset for
which Species is virginica:
lm(Sepal.Length ~ Sepal.Width, iris, subset = Species == setosa)
I have attached a graph image of what i am trying to plot.
The x-axis in the image(rs*), would correspond to the position column in my
first file. The ticks are not equidistant but are placed based on their
proportionate distance from the eachother.
So, the horizontal line i need to draw would be
dear experts,
i am a novice and have been trying to use the anderson-darling test
on a simple text file with one column of data.
i have followed the example in the manual to read from a file into a vector(mm).
i am able to see the summary stats with
summary(mm)
however, when i try to use the
Does anyone have a way of producing solid shapes other than spheres in
rgl? I am using rgl to produce a simple visualisation of a forest model
results using lollipops. Its just a bit of fun, but as many of the
trees are pines I would like to depict their crowns as cones. If there
is a solution
Hi
How can do this in R.
df
48
1
35
32
80
If df 30 then replace it with 30 and else if df 60 replace it with 60. I
have a large dataset so I cant afford to identify indexes and then replace.
Desired o/p:
48
30
35
x - 10*1:10
pmin(pmax(x, 30), 60) # 30 30 30 40 50 60 60 60 60 60
On 5/23/06, Sachin J [EMAIL PROTECTED] wrote:
Hi
How can do this in R.
df
48
1
35
32
80
If df 30 then replace it with 30 and else if df 60 replace it with 60.
I have a large dataset so I cant afford to
On Tue, 2006-05-23 at 11:40 -0700, Sachin J wrote:
Hi
How can do this in R.
df
48
1
35
32
80
If df 30 then replace it with 30 and else if df 60 replace it
with 60. I have a large dataset so I cant afford to
Try this function (and modify it to your hearts content):
rgl.cones - function(x,y,z,h=1,r=0.25, n=36, ...){
r - rep(r, length.out=length(x))
h - rep(h, length.out=length(x))
step - 2*pi/n
for (i in seq(along=x)){
for (j in seq(0, 2*pi-step, length=n)){
tmp.x - x[i] +
you could try something like:
ifelse(df 30, 30, ifelse(df 60, 60, df))
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax:
Sachin J wrote:
Hi
How can do this in R.
df
48
1
35
32
80
If df 30 then replace it with 30 and else if df 60 replace it with 60.
I have a large dataset so I cant afford to identify indexes and then replace.
Thank you Gabor,Marc,Dimitrios and Sundar.
Sachin
Gabor Grothendieck [EMAIL PROTECTED] wrote:
x - 10*1:10
pmin(pmax(x, 30), 60) # 30 30 30 40 50 60 60 60 60 60
On 5/23/06, Sachin J wrote:
Hi
How can do this in R.
df
48
1
35
32
80
If df 30 then replace it with 30 and else
Johannes Hüsing [EMAIL PROTECTED] writes:
[...]
I think a simple example of what you are trying to do might be needed.
I don't think so, as ...
But take a look at the help pages for assign() and get().
... this seems to be what I was looking for. Many thanks!
Greetings
Johannes
Sachin,
there's another slower but more flexible way than Gabor's solution:
ifelse(x30,30,ifelse(x60,60,x))
HTH,
Rogerio.
- Original Message -
From: Sachin J [EMAIL PROTECTED]
To: R-help@stat.math.ethz.ch
Sent: Tuesday, May 23, 2006 3:40 PM
Subject: [R] conditional replacement
Hi
Hello:
I need to take a species-sample matrix and transpose it to the format
used by PC-ORD for analysis. Unfortunately, the number of species is
very large (5000), and so this operation cannot be performed simply
in an application like Excel, which has a 255 column limit. So, I
wrote
This is very strange:
I want compute the following in R:
g = B/D * solve(A)
where B and D are quadratics so they are just a scalar number, e.g. B=t(a)
%*% F %*% a;
I want to multiply B/D to A^(-1),
but R just does not allow me to do that and it keeps complaining that
nonconformable array,
I do not know exactly what you are looking for but it seems that you are
writing the column names (which become row names) when transposing the
data. So to fix this try using write.table(..., sep=,, row.names=F)
Jean
Daniel Gruner wrote:
Hello:
I need to take a species-sample matrix and
Hi,
An other possibility might be to use two devices and use dev.set to go
from one to another :
x11() # the first device (may be windows() or quartz() depending on you OS)
plot(1,1, col=blue) # blue plot
x11() # the second
plot(1.2,1.2, col=red) # red plot
points(1.1,1.1) # appears to bottom
Daniel,
I can help somewhat I think. PC-ORD also allows data input in what
it calls database format, where each row is
sample, taxon, abundance
There as many rows/sample as there are non-zero species, and only three
columns. To get your taxon data.frame (currently samples as rows,
Thanks so much Greg. I was thinking along similar lines but just
couldn't see how to do it. Great trick, just what I needed. They didn't
have to be solid, in fact these are potentially more pine like. Now, I
wonder what other shapes can be made this way.
Duncan
Greg Snow wrote:
Try this
I've thought about this a bit and am just short of simulating data, for which I
do not have time. But, if there are some available data I would be happy to
experiment.
Based on my understanding of the model and data structure, I do think it is
possible to estimate using lmer, but I think it
Just giving the survey package a spin...
I'm accustomed to stata, and it seems very similar in many respects. One
thing is throwing me, however.
I've gotten my data in, and specified the design. Looks like the weighting
is right (based on published population estimates from these data), but now
On 5/23/2006 5:00 PM, Duncan Golicher wrote:
Thanks so much Greg. I was thinking along similar lines but just
couldn't see how to do it. Great trick, just what I needed. They didn't
have to be solid, in fact these are potentially more pine like. Now, I
wonder what other shapes can be made
Hi -
I need to export data to openoffice base, where one of the elements is
a long character vector (255 characters.) write.dbf exports it as
varchar, truncating the data. Any idea how to do this?
thanks,
-eduardo
__
R-help@stat.math.ethz.ch mailing
saveSubplot - function() {
if (!exists(subplotPars, mode=list))
subplotPars - list();
p - par(no.readonly=TRUE);
mfg - p$mfg;
key - mfg[1]*(mfg[3]-1)+mfg[2];
subplotPars[[key]] - p;
invisible(key);
}
restoreSubplot - function(mfg) {
opar - par();
if (length(mfg) == 2)
mfg
I assume this is (or was) a specification issue. I think write.dbf uses the
shapefile library (C not R library) so it applies to the use of shapefiles and
just happens to have been included in the foreign package because it has a
generic usefullness. (Is that a word?)
Since I very rarely care
Dear List
RGui Version : 2.3.0
User : 1 month
I am having the *dendrogram plotting problem *
The code i tried:
library(cluster)
DD-DataSetS01022 # 575 x 2 matrix
VC-hclust(dist(DD),ave)
*Warning message:
NAs introduced by coercion* ( what does it mean? Is that the problem?)
On Wed, 24 May 2006, Mulholland, Tom wrote:
I assume this is (or was) a specification issue. I think write.dbf uses
the shapefile library (C not R library) so it applies to the use of
shapefiles and just happens to have been included in the foreign package
because it has a generic
G'day Dave,
I have read your e-mail now several time and can't make up my mind if
you want a genuine discussion or just trying to do some flame-baiting.
But here are my 2 cents. And, in case that you don't read through the
whole reply, let me make it clear to you that this is my personal
On 5/23/06, Tim Smith [EMAIL PROTECTED] wrote:
Thanks Tony. That solved a huge part of what I was trying to do.
I was going through the trellis documentation (Bell labs) too. Is there any
other documentation/manual that you would recommend.
Taking a look at the Changes file, e.g. via
83 matches
Mail list logo