Dear friends,
I'm looking for a function which solves the system of equations Ax=B where A is
a positive definite banded matrix. I know that the command solve can be used to
arrive at a solution. But does it work as well with banded matrices?
In GAUSS the command bandsolpd achieves this. So
On Monday 27 August 2007 22:21, David Scott wrote:
On Tue, 28 Aug 2007, Robert A LaBudde wrote:
If you format the column as Text, you won't have this problem. By
leaving the cells as General, you leave it up to Excel to guess at
the correct interpretation.
Not true actually. I had
Thanks,
I use Design version 2.1-1 (and as provided, R 2.5.1 on Windows XP).
The redundancies in object names were for my own convience, as part of
a larger command file, and the validation of this univariate model was
only included to ease comparison with the main multivariate model. I have
Using rcmdr i performed a pca
now i would like to build the orrelation matrix starting from the scores
given by rcmdr...
any function about?
moreover, i should transform the pca components values from 0 to 256.
tahnks
duccio
__
I got the Warning message below when I tried to load Locfit. What is wrong?
Regards
Ola Asteman
--
R version 2.4.0 (2006-10-03)
Copyright (C) 2006 The R Foundation for Statistical Computing
Hi,I am puzzled with different results in R, compared to SPSS and
Senstools.Net. After running a PCA on the three software (for R, I use the PCA
function programmed on the FactoMineR package), I extracted the loadings. In
the three cases, the loadings are exactly identical.Then, I applied the
Ola Asteman wrote:
I got the Warning message below when I tried to load Locfit. What is wrong?
Please read the posting guide which suggests to use a sensible subject line.
Regards
Ola Asteman
Hi All,
I have two variables X, Y. The question is if the value of X is equal to
one, then the values in Y have to be reversed other wise it should not perfom
any action. I think this should be done using lapply function?
Example
Y values : 1 2 3 NA
X Y (ORIGINAL) Y
Dear R-users,
I would like to add a legend at the bottom of pairs plots (it's my first
use of this function). With the plot function, I usually add some
additional space at the bottom when I define the size of the graphical
device (using mar); grid functions then allows me to draw my legend as
From ?pairs
The graphical parameter 'oma' will be set by 'pairs.default'
unless supplied as an argument.
so try
pairs(iris[1:4], main = Anderson's Iris Data -- 3 species, pch = 21,
bg = c(red, green3, blue)[unclass(iris$Species)],
oma = c(8,3,5,3))
On Tue, 28 Aug
You don't have installed the akima pakage.
install.packages(akima, dep=T)
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 28/08/07, Ola Asteman [EMAIL PROTECTED] wrote:
I got the Warning message below when I tried to load Locfit. What is
wrong?
Regards
Ola
How can I change the tick marks in a boxplot so that they lie on the
inside of the x and y axes? In plot I have been setting tcl=0.2 but
that doesn't do anything in boxplot. What am I missing?
Thanks,
Emily
__
R-help@stat.math.ethz.ch mailing list
I'd be glad to help, but I don't think I understand the problem. Here's what I
get:
x -
as.data.frame(matrix(ncol=3,seq(1,12),dimnames=list(c(),c(hh,total,total.inf
x
hh total total.inf
1 1 5 9
2 2 610
3 3 711
4 4 812
At 01:21 AM 8/28/2007, David wrote:
On Tue, 28 Aug 2007, Robert A LaBudde wrote:
If you format the column as Text, you won't have this problem. By
leaving the cells as General, you leave it up to Excel to guess at
the correct interpretation.
Not true actually. I had converted the column to Text
Hi Mark,
I don't know wether you recived a sufficient reply or not, so here are
my comments to your problem.
Supressing the constant term in a regression model will probably lead to
a violation of the classical assumptions for this model.
From the OLS normal equations (in matrix notation)
(1)
On 28 August 2007 at 08:04, Frank E Harrell Jr wrote:
| Wentzel-Larsen, Tore wrote:
| Thanks,
| I use Design version 2.1-1 (and as provided, R 2.5.1 on Windows XP).
|
| Sorry I missed the latter.
|
| The redundancies in object names were for my own convience, as part of
| a larger command
Wentzel-Larsen, Tore wrote:
Thanks,
I use Design version 2.1-1 (and as provided, R 2.5.1 on Windows XP).
Sorry I missed the latter.
The redundancies in object names were for my own convience, as part of
a larger command file, and the validation of this univariate model was
only included to
Hi,
thank a lot for your answers!
As other people get the correct result but I get this
mysterious result with this script even after running
it on a freshly started R, it must be a problem with
my particular R setup. I'll try updating.
Thanks for the help, now I know where I have to
search.
Hi,
names(fit)
fit$coefficients[[2]] - 100
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 28/08/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Dear all,
I would like to use predict.lm() with an existing lm object but with new
arbitrary coefficients. I modify
[EMAIL PROTECTED] napsal dne 28.08.2007 13:33:13:
You don't have installed the akima pakage.
install.packages(akima, dep=T)
And wait about two months and update your R version to 2.6.0. Or update
now to 2.5.1
Regards
Petr
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40
Dear all,
I would like to use predict.lm() with an existing lm object but with new
arbitrary coefficients. I modify 'fit$coef' (see example below) by hand but
the actual model in 'fit' used for prediction does not seem to be altered
(although fit$coef is!).
Can anyone please help me do this
On 28-Aug-07 14:12:22, Marie Anouk Simard wrote:
It would seem (from the headers) that Marie sent her message
within a TNEF attachment, which the R-help server has duly
stripped off!
I would suggest thatshe re-sends her message in
__
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
and provide commented, minimal, self-contained, reproducible code.
Hi,
I have data in the following form:
index count
-7 32
19382
22192
7 190
11 201
I'd like to get quantiles from the data. I thought about something like this:
index - c(-7, 1, 2, 7, 11)
count - c(32, 9382, 2192, 190, 201)
You could use:
require(quantreg)
rq(index ~ 1, weights=count, tau=0:5/5)
url:www.econ.uiuc.edu/~rogerRoger Koenker
email[EMAIL PROTECTED]Department of Economics
vox: 217-333-4558University of Illinois
fax: 217-244-6678
Hi Dr Lumley,
Thanks to you and Dr. Murdoch for your helpful explanations. See below.
On Mon, 27 Aug 2007, Thomas Lumley wrote:
On Mon, 27 Aug 2007, Faheem Mitha wrote:
setClass(foo, representation(x=numeric))
bar - function(object)
{
return(0)
}
bar.foo - function(object)
{
Dear R-users,
I want to know if there is a package that allows to define different
experimental designs (factorial, orthogonal, taguchi)
and to compare them.
I don't found one in the R-web site, but it is possible I missed it!
Thank you in advance
Sincerely,
Marc
On Tue, 28 Aug 2007, Faheem Mitha wrote:
Warning message:
in the method signature for function bar no definition for class:
âÂÂbazâ in: matchSignature(signature, fdef, where)
I'm being dense. That just means that the class baz has not been
defined, presumably.
I want to check whether all the components of a vector (or an array)
are 0, and if they are I will skip the later computations. Of course
I can create a loop to go through all the components. However is
there an R function for this purpose more efficient than looping?
Thanks a lot,
Gang
Thanks for telling me that you could not get my message, I hope this work
better...
so my question was:
I built a population matrix to which I applied the fonction eigen in order
to find the main parameters about my population. I know that the first
eigen value correspond to lambda or
I have columns which sum to one. They are membership dummies, fractions are
allowed - I made an example:
x - c( 9.899898,6.9555431,-1.251,0.5200,0.480,0.000,-2.2384737,
16.791361,6.8924369,-3.286,0.78846154,0.2115385,0.000,-0.4720061,
Hi Edna --
I have Rmpi 0.5-3 under R 2.5.1 with LAM 7.1.2 installed on an x86_64
SuSE 10.0.
I installed (as a regular user, to my own disc space) LAM and ran
through some basic checks (lamboot / lamhalt, checking that I could
compile the demo programs)
After downloading Rmpi_0.5.3.tar.gz, I
Hi all,
I have this list of strings
[1] 1 ,2 ,3 4 ,5 ,6
Is there an efficient way to convert it to data.frame:
V1 V2 V3
1 1 23
2 4 56
Like I can use strsplit to get to a list of split strings.. and then use say
a = strsplit(mylist, ,)
data.frame(V1 = lapply(a,
Hi,
do.call(rbind, lapply(strsplit(mylist, ,), as.numeric))
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 28/08/07, yoo [EMAIL PROTECTED] wrote:
Hi all,
I have this list of strings
[1] 1 ,2 ,3 4 ,5 ,6
Is there an efficient way to convert it to
Please use R's search tools.
RSiteSearch(experimental design, restr = funct)
finds optBlock() in the AlgDesign package as the 10th hit.
Whether this package will have what you want is another issue.
Bert Gunter
Genentech Nonclinical Statistics
-Original Message-
From: [EMAIL
Try this:
s - c(1 ,2 ,3, 4 ,5 ,6)
read.csv(textConnection(s), header = FALSE)
V1 V2 V3
1 1 2 3
2 4 5 6
On 8/28/07, yoo [EMAIL PROTECTED] wrote:
Hi all,
I have this list of strings
[1] 1 ,2 ,3 4 ,5 ,6
Is there an efficient way to convert it to data.frame:
V1 V2 V3
1
It is fit$coefficients, not fit$coef .
From the help page:
name: A literal character string or a name (possibly backtick
quoted). For extraction, this is normally (see under
Environments) partially matched to the 'names' of the object.
Note the qualifier 'for
I was reading a presentation of Professor Peng's and typed the
presentation code into R but I changed it to make plot.polygon a
separate function instread of defining the function in SetMethod itself
as he did. Is that the problem with the code below because
plot(p) just gives me zero. Thanks.
Dear R-users,
I have found this not-so-recent post in the archives -
http://tolstoy.newcastle.edu.au/R/devel/00a/0291.html - while I was
looking for a particular way to reorder factor levels. The question
addressed by the author was to know if the read.table function could be
modified to
Edna --
I'll keep this on the list, so that others will learn, and others will
correct me when I give bad advice!
relocation R_X86_64_32 against `lam_mpi_comm_world' can not be used
when making a shared object; recompile with -fPIC
This likely means that your lam was not built with the
A full factorial can be generated using expand.grid.
Try AlgDesign, BHH2 and conf.design for various fractional and D-optimal design
generators; they all work.
I haven't tried the experiment package yet, though the synopsis looks
interesting.
The 'Design' package itself I found disappointing for
On a related note, there's one other amazingly stupid thing that Excel
(2002 SP3) does - it exports to CSV the numbers as you see them
displayed, and not as they were entered/imported in the first place.
For example, 1.2345678 will be exported to CSV/tab delimited as 1.23
if that column is
Hi All,
I have some data I need to write as a file from R to use in a different
program.
My data comes as a numeric matrix of n rows and 2 colums, I need to transform
each row as a two rows 1 col output, and separate the output of each row with a
blanck line.
Foe instance I need to go from
You can create your own class and pass that to read table. In
the example below Fld2 is read in with factor levels C, A, B
in that order.
library(methods)
setClass(my.levels)
setAs(character, my.levels,
function(from) factor(from, levels = c(C, A, B)))
### test ###
Input - Fld1 Fld2
10 A
Hi Federico,
Federico Calboli wrote:
Hi All,
I have some data I need to write as a file from R to use in a different
program.
My data comes as a numeric matrix of n rows and 2 colums, I need to transform
each row as a two rows 1 col output, and separate the output of each row with
a
Thanks for telling me that you could not get my message, I hope this work
better...
so my question was:
I built a population matrix to which I applied the fonction eigen in order
to find the main parameters about my population. I know that the first
eigen value correspond to lambda or
Hello,
As suggested in De'ath, 2002. Multivariate regression trees: A new
technique for modelling species-environment relationships. Ecology, 83
(4):1105-1117 (for those interested), I am trying to compare the
performance of a multivariate regression tree to a cluster analysis.
A simple
an array is just a vector with attributes.
all ( diag(2) == 0 )
[1] FALSE
all ( diag(2)*0 == 0 )
[1] TRUE
On Tue, 28 Aug 2007, Gang Chen wrote:
I want to check whether all the components of a vector (or an array)
are 0, and if they are I will skip the later computations. Of course
I can
On Tue, 28 Aug 2007, Martin Morgan wrote:
Edna --
I'll keep this on the list, so that others will learn, and others will
correct me when I give bad advice!
relocation R_X86_64_32 against `lam_mpi_comm_world' can not be used
when making a shared object; recompile with -fPIC
This likely
Sorry this has taken so long to get back to you, I have been out of the office
a lot recently.
The documentation for read.table suggests that since an as.ordered function
exists, that you could just use ordered as a column class, but I don't know
how well that works in practice. In general I
Hi,
What's a good way to quickly determine the location of a failure in my RUnit
test suite? For instance, if I do the following:
==
library(RUnit)
runTestSuite( defineTestSuite(MyTests, src/r, testFuncRegexp=metrics) )
Executing test function
The important element in the fit object is named coefficients not coef.
Sometimes the partial matching can cause confusion when it tries to help. In
your case it creates a copy of the coefficients, changes the 2nd value, then
creates a new component to fit called coef with these values (not
See the wtd.quantile function in the Hmisc package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Seung Jun
Sent: Tuesday,
Dear all,
I am quite puzzled about the bound and absolute.t arguments to the l1ce
function in the lasso2 package. (The l1ce function estimates the regression
parameter b in a regression model y=Xb+e subject to the constraint that |b|t
for some value t).
The doc says:
boundnumeric,
On 28/08/2007, at 7:16 PM, J Dougherty wrote:
snip
PS, I quit using Excel for most important work after it returned a
negative
variance on some data I was collecting descriptive statistics on.
Those of you who have not seen it should have a look at Jonathan
Cryer's commentary
on
I'm trying to extend some work in the car and heplots packages
that requires getting a table of multivariate means for one
(or later, more) terms in an mlm object. I can do this for
concrete examples, using aggregate(), but can't figure out how to
generalize it. I want to return a result that
Thanks Gabor, I have two questions:
1- Is there any difference between your code and the following one, with
regards to Fld2 ?
### test ###
Input - Fld1 Fld2
10 A
20 B
30 C
40 A
DF - read.table(textConnection(Input), header = TRUE)
DF$Fld2-factor(DF$Fld2,levels= c(C, A, B)))
2- do you see
Its not clear from your description what you want.
Could you be a bit more specific including an example.
On 8/28/07, Sébastien [EMAIL PROTECTED] wrote:
Thanks Gabor, I have two questions:
1- Is there any difference between your code and the following one, with
regards to Fld2 ?
### test ###
Dear All:
I have a dataset like
A=c(0,12,34,5,6,0,4,5,6,0,12,3,4,8,7,0,4,3,5,0,...),I want to add a
column to this dataset, it must be in
B=c(1,1,1,1,1,2,2,2,2,3,3,3,3,3,3,4,4,4,4,5,..), How can I create B
based on the sequence of A. Appreciate.
Zheng
Ok, I cannot send to you one of my dataset since they are confidential.
But I can produce a dummy mini dataset to illustrate my question.
Let's say I have a csv file with 3 columns and 20 rows which content is
reproduced by the following line.
mydata-data.frame(a=1:20,
below works on you example but someone will have something more elegant.
zeroindices-which(a == 0)
rep(1:length(zeroindices),c(diff(zeroindices),(length(a)-zeroindices[len
gth(zeroindices)]+1)))
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Zheng
On Tue, 28 Aug 2007, Zheng Lu wrote:
Dear All:
I have a dataset like
A=c(0,12,34,5,6,0,4,5,6,0,12,3,4,8,7,0,4,3,5,0,...),I want to add a
column to this dataset, it must be in
B=c(1,1,1,1,1,2,2,2,2,3,3,3,3,3,3,4,4,4,4,5,..), How can I create B
based on the sequence of A. Appreciate.
Its the same principle. Just change the function to be suitable. This one
arranges the levels according to the input:
library(methods)
setClass(my.factor)
setAs(character, my.factor,
function(from) factor(from, levels = unique(from)))
Input - a b c
1 1 176 w
2 2 141 k
3 3 172 r
4 4
Sebastain
Does the following work for you?
seb - read.table(file='clipboard', header=T)
seb$c
[1] w k r s k p l u z s j j x r d j x w q f
Levels: d f j k l p q r s u w x z
seb$c - factor(seb$c, levels=unique(seb$c))
seb$c
[1] w k r s k p l u z s j j x r d j x w q f
Levels: w k r s p l u z j x
Hello,
I apologise if someone has already answered this but I searched and
googled but didn't find anything.
I have a matrix which gives me the similarity of each item to each
other. I would like to turn this matrix into something like what they
have in the graph package with the nodes
Peter, Gabor: thanks to both of you.
This 'unique' function is what I was looking for !
Peter Alspach a écrit :
Sebastain
Does the following work for you?
seb - read.table(file='clipboard', header=T)
seb$c
[1] w k r s k p l u z s j j x r d j x w q f
Levels: d f j k l p q r s u w x z
Hi, I am writing a BRugs code and I need to specify the likelihood for the
gamma distribution and I am specifying it as the pdf:
(pow(b1,a1)/(exp(loggam(a1)))*(exp(-b1*lambda[i]))*pow(lambda[i],(a1-1)))
But it is not accepting it although I know that I could use the pdf in R to
estimate the
Consider a data frame (x) with 2 variables, x1 and x2, having equal values.
It looks like:
x1 x2
11
22
33
Now, consider a second data frame (xk):
xk1 xk2
0.50.5
1.00.5
1.50.5
2.00.5
0.51
1.01
1.51
2.01
0.51.5
1.01.5
1.51.5
2.01.5
Dear Listers:
I have this task and suppose a0 is a list of 10 data.frames, I want to
calculate like this
(a0[[1]]+a0[[2]]+..+a[[10]])/10
Thanks.
--
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.
Did you always know?
No, I did not. But I believed...
---Matrix III
Paul,
i have no idea what functionality you need from graph, but
if the igraph package can do what you want then it can
easily convert this to a graph for you, basically it is just
threshold - 0.5
g - graph.adjacency(simthreshoold)
or you can create a weighted graph:
g - graph.adjacency(sim,
Here is a way using sprintf:
x - read.table(textConnection( V2 V3
27 2032567 19
28 2035482 19
126 2472826 19
132 2473320 19
136 2035480 135
145 2062458 135
148 2074927 135
151 2102395 142
156 2027252 142
158 2473082 142))
# output the data
cat(sprintf(%d\n%d\n\n, x$V2, x$V3),
At 09:11 29/08/07 Jim Holtman wrote
Here is a way using sprintf:
x - read.table(textConnection( V2 V3
27 2032567 19
28 2035482 19
126 2472826 19
132 2473320 19
136 2035480 135
145 2062458 135
148 2074927 135
151 2102395 142
156 2027252 142
158 2473082 142))
# output the data
I think you can use 'outer'
outer(b$xk1, a$x1, function(y,z)abs(z-y))
outer(b$xk2, a$x2, function(y,z)abs(z-y))
On 8/28/07, dxc13 [EMAIL PROTECTED] wrote:
Consider a data frame (x) with 2 variables, x1 and x2, having equal values.
It looks like:
x1 x2
11
22
33
Now,
Hi,
I have a dataframe that contains pedigree information;
that is individual, sire and dam identities as separate
columns. It also has date of birth.
These identifiers are not numeric, or not sequential.
Obviously, an identifier can appear in one or two columns,
depending on whether it was a
try:
colMeans(do.call('rbind', lapply(a0, mean)))
On 8/28/07, Weiwei Shi [EMAIL PROTECTED] wrote:
Dear Listers:
I have this task and suppose a0 is a list of 10 data.frames, I want to
calculate like this
(a0[[1]]+a0[[2]]+..+a[[10]])/10
Thanks.
--
Weiwei Shi, Ph.D
Research Scientist
extracting dataset with average imputed values from aregImpute()
Dear all:
after many trials, i am still quite lost on how to exact a dataset with
average imputed values after running aregImpute()
take the eg in the aregImpute(Hmisc) documentation(-- which also appeared in
our R-archive
On 8/22/07, Polly He [EMAIL PROTECTED] wrote:
I'm trying to fit a naive Bayes model and predict on a new data set using
the functions naivebayes and predict (package = e1071).
R version 2.5.1 on a Linux machine
My data set looks like this. class is the response and k1 - k3 are the
Hi Paul,
H. Paul Benton [EMAIL PROTECTED] writes:
I have a matrix which gives me the similarity of each item to each
other. I would like to turn this matrix into something like what they
have in the graph package with the nodes and edges.
http://cran.r-project.org/doc/packages/graph.pdf .
Along with the example I gave using graphAM, you might also want to
look at the help page for the distGraph class which may be more
directly what you want:
library(graph)
class ? distGraph
__
R-help@stat.math.ethz.ch mailing list
Try this:
# test data
mat - structure(c(1, 0.325141612, 0.002109751, 0.250153137, 0.0223676,
1, 0.342654, 0.1987485, 0.9723831, 0.9644216, 1, 0.7391222, 0.394331,
0.5460461, 0.7080224, 1), .Dim = c(4L, 4L), .Dimnames = list(
c(a, b, c, d), c(a, b, c, d)))
library(sna)
# draw edges according
80 matches
Mail list logo