On Thu, 2 Sep 2004, Simone Vantini wrote:
> I'm trying to personalize the rpart function by introducing a
> list('init','split','eval') in the argument method. But I receive an error
> message:"Error in t.default(x): argument is not a matrix".
> Can anyone tell me what the argument of this functio
Hi,
These are two problems I've never seen when I used xtable() before...
R 1.9.1 for Windows XP, xtable version 1.2-3:
> final.df
Loci ChrMarker Position P.values Deviance DF
1 Idd5 1 D1Mit181 42.6 0.0011 103.21 78
2 Idd6/19/20 6 D6Mit374 66.
> Someone else mentioned Venables and Ripley (2000) S
> Programming (Springer). Please see this or some other discussion of
the
> "..." argument.
The "Introduction to R" (from Cran website) also talks about it. See pg
49 - section 10.4 (was just reading this the other day).
Cheers
Manoj
---
Schwarz,Paul wrote:
Hi,
I've been passing the hist() function to tapply() to quickly generate histograms based
on the list of factors supplied to tapply(). However, I have not figured out how to
generate titles for each of the histograms, which paste in the unique values of the
list factors as
Erin Hodgess wrote:
Dear R and S People:
First, thank you to so many people for your help to my problem.
Here is the solution:
a <- 0.5*(outer(1:n3,1:n3,function(x,y,n2.){n2. - pmax(x,y)},n2.=n2))
I have one final pesky question, please:
During my experiments, I tried the following:
a <- 0.5*(oute
Dear R and S People:
First, thank you to so many people for your help to my problem.
Here is the solution:
a <- 0.5*(outer(1:n3,1:n3,function(x,y,n2.){n2. - pmax(x,y)},n2.=n2))
I have one final pesky question, please:
During my experiments, I tried the following:
a <- 0.5*(outer(1:n3,1:n3,func
Sigal Blay wrote:
Thank you for the fast reply.
Below is a simplified version of my c function that I am
currenctly using with a .C() call.
The values that has to be returned to R are the three outVectors.
If I need to convert .C to .Call,
How do I do it based on myFunction below?
Thank you for
On top of what Rolf had said, traceback() would help tracking down how the
error happened.
Andy
> From: Rolf Turner
>
> t is for transpose; look at ?t, ?t.default,
> ?t.data.frame
>
> Bottom line: Somewhere in your code you are trying to transpose
> something that is not a matrix. (Or you are
Thank you for the fast reply.
Below is a simplified version of my c function that I am
currenctly using with a .C() call.
The values that has to be returned to R are the three outVectors.
If I need to convert .C to .Call,
How do I do it based on myFunction below?
Thank you for your help.
void
t is for transpose; look at ?t, ?t.default,
?t.data.frame
Bottom line: Somewhere in your code you are trying to transpose
something that is not a matrix. (Or you are passing to an existing
function an object which that function expects to be a matrix, but
isn't.)
cheers
I'm trying to personalize the rpart function by introducing a
list('init','split','eval') in the argument method. But I receive an error
message:"Error in t.default(x): argument is not a matrix".
Can anyone tell me what the argument of this function is or where this
function appears in the rpart fu
Erin Hodgess <[EMAIL PROTECTED]> writes:
> Dear R and S People:
>
> I have run across something very strange. Here is a function that I wrote
> for R:
>
> boot1 <- function(y,method="f",p=1) {
> n1 <- length(y)
> n2 <- n1*p
> n3 <- n2 - 1
> a <- 0.5*(outer(1:n3,1:n3,function(x,y){n2 - p
On Wed, 1 Sep 2004, S. Blay wrote:
> I need to retrieve several vectors of various types from a call
> to .C(), but I don't know their length in advance.
> Is there a way to do this without allocating an excessive amount
> of memory?
> If so, an example would be very helpful.
It would be very
S. Blay wrote:
Dear R helpers,
I need to retrieve several vectors of various types from a call
to .C(), but I don't know their length in advance.
Is there a way to do this without allocating an excessive amount
of memory?
If so, an example would be very helpful.
You should probably use the .
Dear R helpers,
I need to retrieve several vectors of various types from a call
to .C(), but I don't know their length in advance.
Is there a way to do this without allocating an excessive amount
of memory?
If so, an example would be very helpful.
S. Blay
Department of Statistics and Actuari
Hi Paul,
I think lattice's histogram will do what you want, and in a friendlier
manner. Take a look at this example:
require(lattice)
a <- data.frame(draw = as.vector(mapply(rnorm, rep(100, 4), rep(0, 4),
1:4)),
sd = factor(paste("sd =", rep(1:4, each = 100
Go ahead and exa
Hi, Erin:
A cleaner way is to pass "n2" to "outer" as a "..." argument, as
in the following modification of your code:
boot1 <- function(y,method="f",p=1) {
n1 <- length(y)
n2 <- n1*p
n3 <- n2 - 1
a <- 0.5*(outer(1:n3,1:n3,function(x,y, n2.){n2. - pmax(x,y)}, n2.=n2))
return(a)
}
y1 <- c(
Dear R and S People:
I ended up using the "assign" command, and things work in S+.
boot1 <- function(y,method="f",p=1) {
n1 <- length(y)
#n2 <- n1*p
assign("n2",n1*p)
n3 <- n2 - 1
a <- 0.5*(outer(1:n3,1:n3,function(x,y){n2 - pmax(x,y)}))
return(a)
}
thanks for listening!
Sincerely,
Erin H
mail
Dear Michael and Peter,
I've made the following changes to the current development version of the
Rcmdr package (on my web site, at
http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/index.html, but not posted
to CRAN):
(1) The default for the Rcmdr grab.focus option is now set to FALSE for
non-Wi
Dear R and S People:
I have run across something very strange. Here is a function that I wrote
for R:
boot1 <- function(y,method="f",p=1) {
n1 <- length(y)
n2 <- n1*p
n3 <- n2 - 1
a <- 0.5*(outer(1:n3,1:n3,function(x,y){n2 - pmax(x,y)}))
return(a)
}
and here is the R output:
> y1
[1] 9 8 7 3 6
Hi,
I've been passing the hist() function to tapply() to quickly generate histograms based
on the list of factors supplied to tapply(). However, I have not figured out how to
generate titles for each of the histograms, which paste in the unique values of the
list factors as part of the histogr
Ludwig Baringhaus wrote:
Several versions of the D'Agostino Test are implemented in
"fBasics" from Rmetrics beside many other tests for normality
Unlike the Shapiro-Wilk or the Anderson-Darling test, the
D'Agostino test is not an omnibus test for testing the
hypothesis of normality. In fact,
I am not sure if I understand your problem but I think you might be
close to the solution. Perhaps if you changed 'index' in your code to
'i', you might get the answer. Try this :
set.seed(1066)
m <- matrix(rnorm(9), nc=3)
colnames(m) <- paste("ratio", 1:3, sep="")
m
ratio1 ratio2
Arne Henningsen email.uni-kiel.de> writes:
>
> Hi Hendrik,
>
> if I understand you right, match.call() can help you.
>
> All the best,
> Arne
>
> On Wednesday 01 September 2004 12:13, Henrik Andersson wrote:
> > I want to use the name that I assign to an object in the function that
> > produc
Dewez Thomas wrote:
Hi all,
I haven't been able to find how to assess a variable who's name is
constructed with paste. The problem is following: In a data frame, there are
12 columns whose title vary only by a digit, all other part being equal. I
would like to compute a operation on a subset these
You can use "[[", I think, as in
basin.param[[string.variable]]
or, eqivalently for a data frame
basin.param[, string.variable]
-roger
Dewez Thomas wrote:
Hi all,
I haven't been able to find how to assess a variable who's name is
constructed with paste. The problem is following: In a data frame, th
http://cran.r-project.org/src/contrib/cluster_1.9.6.tar.gz
Andy
> From: Kannnan
>
> Dear sir,
>
> I like to change the objective function in
>
> fanny function(fuzzy clustering) and I like to modify the membership
> function in constructing membership grade to objects to the class.
>
>
> S
Hi all,
I haven't been able to find how to assess a variable who's name is
constructed with paste. The problem is following: In a data frame, there are
12 columns whose title vary only by a digit, all other part being equal. I
would like to compute a operation on a subset these variables and parse
I guess that the perl script during the installation of Hmisc
has used all of your available memory.
I had the same problem with my laptop (288MB RAM), using
the console without an X-Server and/or adding some temporary
Swap space could help.
Best
jan
On Mon, 30 Aug 2004, data Analytics wrote:
Pär Matsson wrote:
Hi! Probably a simple question, but I can't get any tick marks in the 3d
scatterplot I created using the cloud function.
The following works to display the three groups using different symbols:
data(iris)
cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris, cex = 1.2,
name <- c("a", "b", "a", "c", "d", "a", "b")
addr <- c(10, 20, 10, 30, 40, 10, 20)
duplicated(name)
[1] FALSE FALSE TRUE FALSE FALSE TRUE TRUE
which(duplicated(name))
[1] 3 6 7
addr[ -which(duplicated(name)) ]
[1] 10 20 30 40
cbind( name, addr) [ -which(duplicated(name)), ]
name addr
[
1. Have you followed "the posting guide!
http://www.R-project.org/posting-guide.html";? In many cases, it might
help you answer your own questions. If not, it might help you formulate
a question in a way that might generate more useful replies.
2. Have you studied Pinhiero and B
Try this:
l.1 <- list(list(name='a', addr='123'),list(name='b', addr='234'),
list(name='b', addr='234'), list(name='a', addr='123')) # create a
list
l.names <- unlist(lapply(l.1, '[[', 'name')) # get the 'name'
l.u <- unique(l.names) # make unique
new.list <- l.1[match(l.u, l.names
On Wed, 1 Sep 2004, michael watson (IAH-C) wrote:
> I have a list. Two of the elements of this list are "Name" and
> "Address", both of which are character vectors. Name and Address are
> linked, so that the same "Name" always associates with the same
> "Address".
>
> What I want to do is pull
Hi! Probably a simple question, but I can't get any tick marks in the 3d
scatterplot I created using the cloud function.
The following works to display the three groups using different symbols:
data(iris)
cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris, cex = 1.2,
groups = Species,
Hi
I have a list. Two of the elements of this list are "Name" and
"Address", both of which are character vectors. Name and Address are
linked, so that the same "Name" always associates with the same
"Address".
What I want to do is pull out the unique values, as a new list of the
same format (ie
On Wed, 1 Sep 2004, Eryk Wolski wrote:
> ?assign
No, this is not going to work.
If Henrik has described his wish correctly, he wants to execute the call
assigned.name <- stupid.function(whatever)
and be able, inside stupid.function, to find out what name the result is
going to be assigned to.
Dear sir,
I like to change the objective function in
fanny function(fuzzy clustering) and I like to modify the membership
function in constructing membership grade to objects to the class.
So I kindly request to provide the source code of this fanny function,
it will be very helpful to continu
Dear Michael,
I can confirm Michael's observations: no problems until after a graphics
device window is opened. Then increasing numbers of warnings each time
commands are executed from within the Rcmdr. This happens whether the
commands are executed from dialog boxes or from the (upper) script win
I need to do a sample size calculation to determine the number of audits
required.
The results of an audit will be:
1) OK
2) Minor variances
3) Multiple variances
4) Severe variances
We want to know the sample size required to determine the proportions in
each category within say 5% with a confid
Bock, Michael would like to recall the message, "Multiple dependant proportions and
sample size".
[[alternative HTML version deleted]]
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting gui
Hello,
Does anyone know if the SIMPER analysis is implemented in R?
It is a multivariate analysis that shows the contribution of a each variable in a
group, and the variables responsible for the difference between groups.
It is implemented in the statistical package PRIMER and is frequently used
I need to do a sample size calculation to determine the number of audits
required.
The results of an audit will be:
1) OK
2) Minor variances
3) Multiple variances
4) Severe variances
We want to know the sample size required to determine the proportions in
each category within say 5% with a confid
On Wed, 1 Sep 2004, javier garcia - CEBAS wrote:
> Hi;
> I'm in Spain and my locale and tz are the spanish one, and I'm using plot()
> with irregular time series. And I would like to change the default labels in
> x and y axis:
>
> 1) The labels of months in the x axis of the plots appear in Sp
Hi;
I'm in Spain and my locale and tz are the spanish one, and I'm using plot()
with irregular time series. And I would like to change the default labels in
x and y axis:
1) The labels of months in the x axis of the plots appear in Spanish -
c("Enero,"Febrero",...) - and I would like them to a
Harmony Tenney wrote:
How do I calculate the 95th percentile when I know the 25th, the median and the 75th??
He? You cannot, or do you have some concrete knowledge about the
distribution? Then you might be able to parameterize the distribution
(if not too many parameters have to be estimated) by
How do I calculate the 95th percentile when I know the 25th, the median and the 75th??
Thanks,
Harmony Tenney
[[alternative HTML version deleted]]
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read th
Dimitris Rizopoulos wrote:
Hi Jan,
you could try the following:
dat <- data.frame(Price=c(10,12,NA,8,7,9,NA,9,NA),
Crop=c(rep("Rise", 5), rep("Wheat", 4)),
Season=c(rep("Summer", 3), rep("Winter", 4),
rep("Summer", 2)))
##
dat <- dat[order(dat$Season, dat$Cro
Thanks Brian and Sean,
Works well and solves another problem I had: changing
the same condition in a series of related but
different queries, by making only one change in a
variable that is then used in all the queries.
Mikkel
--- Sean Davis <[EMAIL PROTECTED]> wrote:
> I often use paste to bui
Alexandre Galvão Patriota wrote:
Hi, I'm having some problems regarding the packages
lme4 and nlme, more specifically in the denominator
degrees of freedom. I used data Orthodont for the two
packages. The commands used are below.
require(nlme)
data(Orthodont)
fm1<-lme(distance~age+ Sex,
data=Orthod
?assign
/E
On Wed, 1 Sep 2004, Henrik Andersson wrote:
> I want to use the name that I assign to an object in the function that
> produces the output, somewhat like below:
>
> stupid.function <- function(input){
> [body]
> cat("Summarized output is ", output$summary, "Full output is
Gabor Grothendieck myway.com> writes:
:
: Sixten Borg ihe.se> writes:
:
: :
: : In "An Introduction to R" (See R help menu), there is an example of a
: function 'open.account' that makes use
: : of the lexical scope in R.
: :
: : I have a set of functions that can be used to output R tables
John Fox wrote:
Dear Peter and Michael,
I installed Quantian on a spare machine that I have and observed the same
warning messages that Michael has been reporting. These (and the problem
with help files but not with viewing data sets that Peter reported) occurred
with version 0.9-11 of Rcmdr but n
Hi Hendrik,
if I understand you right, match.call() can help you.
All the best,
Arne
On Wednesday 01 September 2004 12:13, Henrik Andersson wrote:
> I want to use the name that I assign to an object in the function that
> produces the output, somewhat like below:
>
> stupid.function <- function(
Hi, all!!
From the help page for 'aggregate':
Splits the data into subsets, computes summary statistics for
each, and returns the result in a convenient form.
So here's the solution I found to this problem:
blocksums <- function(x,n)
{
temp <- 1:length(x)-1
temp <- list((temp%/%n)+1)
aggreg
Sixten Borg ihe.se> writes:
:
: In "An Introduction to R" (See R help menu), there is an example of a
function 'open.account' that makes use
: of the lexical scope in R.
:
: I have a set of functions that can be used to output R tables and graphics
into a single report document. (I am
: aware
Hello to everybody,
I have a quadratic programming problem that I am trying to solve by various
methods. One of them is to use the quadprog package in R.
When I check positive definiteness of the D matrix, I get that one of the
eigenvalues is negative of order 10^(-8). All the others are positiv
hi,
> Is there a way we can obtain
> the exact p-values from lme without rounding?
use summary instead.
> used commands:
>
> library(nlme)
> g<-lme(value~factor(fac1)+factor(fac2)+factor(fac1):factor(fac2),data=mydataframe,random=~1|factor(fac3))
> ag<-anova(g)
summary(g)$tTable[,5] will pr
Dear all,
I am studying the possibility of using the nlme package in R to analyse
field trials of agricultural crops. I have a problem with the syntax for the
modelling of variance covariance structures. I can model the within-group
covariance structure using the correlation argument and the cov
> Several versions of the D'Agostino Test are implemented in
> "fBasics" from Rmetrics beside many other tests for normality.
Unlike the Shapiro-Wilk or the Anderson-Darling test, the
D'Agostino test is not an omnibus test for testing the
hypothesis of normality. In fact, D'Agostino's D
is a suit
Dear all,
I recently use the optim function to find the maxima for some likelihood
function. I have many parameters, more than 12. As the help file mention,
the default method does not do well in univariate case. How about the
different method in optim?
I notice the nlm function uses newton met
I want to use the name that I assign to an object in the function that
produces the output, somewhat like below:
stupid.function <- function(input){
[body]
cat("Summarized output is ", output$summary, "Full output is given
by typing", assigned.name, "\n")
}
assigned.name <- stupid.functio
Adaikalavan Ramasamy <[EMAIL PROTECTED]> writes:
> Look into the code of power.t.test in the stats package. For example,
> the sample size for two-sample t-test, two-tail testing and strict
> interpretation of tail probability can be found by solving the following
> equation iteratively :
>
> \be
I often use paste to build up SQL queries into line-sized chunks, but
this is only a convenience and not required. It does improve
readability and maintainability, in my opinion.
Sean
On Sep 1, 2004, at 5:09 AM, Mikkel Grum wrote:
Dear R-helpers,
When I use sqlQuery in the package RODBC, I cann
Not true: you have to submit the query as one element of a character
vector, not the same thing at all. You *can* use paste() to assemble it.
On Wed, 1 Sep 2004, Mikkel Grum wrote:
> Dear R-helpers,
>
> When I use sqlQuery in the package RODBC, I cannot
> break the line, but have to write the e
Try this:
newPrice = unlist(sapply(Price, Crop:Season,
function(x){
x[is.na(x)]=mean(x,na.rm=T);
return(x);
}))
--- Jan Smit <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> Apologies for this beginner's question. I have a
> variable Price, which is associated with factors
> Season a
Look into the code of power.t.test in the stats package. For example,
the sample size for two-sample t-test, two-tail testing and strict
interpretation of tail probability can be found by solving the following
equation iteratively :
\begin{equation}
1 - \beta = \Pr ( t_{v,ncp}^{*} < t_{v, \alp
Hi Jan,
you could try the following:
dat <- data.frame(Price=c(10,12,NA,8,7,9,NA,9,NA),
Crop=c(rep("Rise", 5), rep("Wheat", 4)),
Season=c(rep("Summer", 3), rep("Winter", 4),
rep("Summer", 2)))
##
dat <- dat[order(dat$Season, dat$Crop),]
dat$Price.imp <- unl
Hello,
Using a fixed effects linear model (with lm), I can get exact p-values
out of the AVOVA table, even if they are very small, eg. 1.0e-200.
Using lme (linear mixed effects) from the nlme library,
it appears that there is rounding of the p-values to zero, if
the p-value is less than about 1.0
Dear R-helpers,
When I use sqlQuery in the package RODBC, I cannot
break the line, but have to write the entire SQL Query
on the same line. Is this expected behaviour? It is
definitely workable, but makes the queries a slightly
difficult to read and edit.
I'm using R 1.9.1 and RODBC 1.0-4 on Win
How about the following code below?
Price[is.na(price)] = mean(Price[-which(is.na(price))]);
HTH
Manoj
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jan Smit
Sent: Wednesday, September 01, 2004 5:44 PM
To: [EMAIL PROTECTED]
Subject: [R] Imputing miss
Dear all,
Apologies for this beginner's question. I have a
variable Price, which is associated with factors
Season and Crop, each of which have several levels.
The Price variable contains missing values (NA), which
I want to substitute by the mean of the remaining
(non-NA) Price values of the sam
"Wolski" <[EMAIL PROTECTED]> writes:
> Hi!
> help.search("sparse matrix")
>
>
> graph2SparseM(graph)Coercion methods between graphs and sparse
> matrices
> tripletMatrix-class(Matrix)
> Class "tripletMatrix" sparse matrices in
>
On Wed, 1 Sep 2004, michael watson (IAH-C) wrote:
> I have a data.frame, and want to perform an analysis of variance on each
> row.
Really? On one row? Makes no sense to me!
> I am currently using aov() and summary(), but what I want to do is
> perform an analysis of variance on each row and
In "An Introduction to R" (See R help menu), there is an example of a function
'open.account' that makes use of the lexical scope in R.
I have a set of functions that can be used to output R tables and graphics into a
single report document. (I am aware that several tools can do this already).
Hi
I have a data.frame, and want to perform an analysis of variance on each
row. I am currently using aov() and summary(), but what I want to do is
perform an analysis of variance on each row and then append the F
statistic and the p-value to the end of the row, so I can then use these
to filter
Hello,
I' doing some simulation on (confirmatory) factor analysis on a
covariance matrix and I resort to factanal() function, which works fine
but it performs only the maximum-likelihood method of extracting factors.
I wonder if (and where) I can find a package that performs the principal
axis f
The error is rather in _your_ log-likelihood: you are going to have to try
much harder to avoid underflow/overflow.
Avoiding log(exp(a1*x1+a2*x2)) would be a start. You might begin to
appreciate why R's d*** and p*** functions have a `log.p' argument.
Better starting values would help, probably
Several versions of the D'Agostino Test are implemented in
"fBasics" from Rmetrics beside many other tests for normality.
Diethelm Wuertz
www.Rmetrics.org
Alexandre Bournery wrote:
Hi, Does anyone know if the D'agostino test is available with R ?
Alex
__
79 matches
Mail list logo