Peng Yu wrote:
Please see below that [3,1] of loadings is not printed. I am wondering
what the problem is?
Not trying ?loadings, perhaps??
-Peter Ehlers
set.seed(0)
m=10
n=4
X=replicate(n,rnorm(m))
pca_result=princomp(X)
svd_result=svd(apply(X,2,function(x){x-mean(x)}))
pca_result$loadin
David Scott napsal dne 17.10.2009 03:01:35:
> Petr PIKAL wrote:
> > Hi
> >
> > r-help-boun...@r-project.org napsal dne 16.10.2009 15:24:05:
> >
> >> hi everybody, I'm a student, and I'm new using R!
> >> I'm looking for statistical
> >> help hoping somebody can answer me!
> >>
> >> This is m
Hi,
I need to plot a spectogram for a speech signal. Is there a package that can
do this?
--
Rajesh.J
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the po
Rolf Turner wrote:
On 19/10/2009, at 4:23 PM, milton ruser wrote:
Hi there,
Try ?subset
No. Don't.
Just do:
X <- dataframe[dataframe$Name=='T44',]
Note the comma in the penultimate position.
Read up on array indexing; see ?"[" and An Introduction to R,
section 5
Hi
Duncan Murdoch napsal dne 16.10.2009 17:01:59:
> On 10/16/2009 9:31 AM, Petr PIKAL wrote:
> > Dear all
> >
> > I noticed from NEWS 2.11.0,dev
> > SIGNIFICANT USER-VISIBLE CHANGES
> >
> > o Packages must have been installed under R 2.10.0 or later, as
> > the current help syste
Peng Yu wrote:
>
> On Sun, Oct 18, 2009 at 10:26 PM, Richard M. Heiberger
> wrote:
>>> points(x[4,],pch=2)# this is plotted as two points
>>
>> drops what it sees as an unnecessary dimension.
>>
>> Use
>>
>>> points(x[4,, drop=FALSE], pch=2)
>>
>> See FAQ 7.5
>>
>> tmp <- matrix(1:2)
>> tmp
>>
Hi Saurav,
I was waiting for someone else to answer you, because I'm not sure
I'll be able to explain clearly. But since no one is jumping on it,
I'll take a stab.
On Sun, Oct 18, 2009 at 5:52 PM, saurav pathak wrote:
> Dear R users
>
> I have a data set which has five variables. One depenedent v
On Sun, Oct 18, 2009 at 10:42 PM, Peng Yu wrote:
> Some webpage has described prcomp and princomp, but I am still not
> quite sure what the major difference between them is. Can they be used
> interchangeably?
>
> In help, it says
>
> 'princomp' only handles so-called R-mode PCA, that is featu
Please see below that [3,1] of loadings is not printed. I am wondering
what the problem is?
> set.seed(0)
> m=10
> n=4
> X=replicate(n,rnorm(m))
> pca_result=princomp(X)
> svd_result=svd(apply(X,2,function(x){x-mean(x)}))
> pca_result$loadings
Loadings:
Comp.1 Comp.2 Comp.3 Comp.4
[1,] 0.86
On Sun, Oct 18, 2009 at 10:26 PM, Richard M. Heiberger wrote:
>> points(x[4,],pch=2)# this is plotted as two points
>
> drops what it sees as an unnecessary dimension.
>
> Use
>
>> points(x[4,, drop=FALSE], pch=2)
>
> See FAQ 7.5
>
> tmp <- matrix(1:2)
> tmp
> tmp[,1]
> tmp[,1,drop=FALSE]
Can I s
Hi. I haven't found this question asked elsewhere, so I hope I am not missing
something trivial.
y<-rnorm(1:10)
x1<-rnorm(1:10)
x2<-rnorm(1:10)
x3<-rnorm(1:10)
x4<-rnorm(1:10)
reg<-lm(y~x1*x2+x3+x4)
summary(reg)
The output of this puts x1:x2 after x3 and x4. In my case this is very
cumbersome b
Some webpage has described prcomp and princomp, but I am still not
quite sure what the major difference between them is. Can they be used
interchangeably?
In help, it says
'princomp' only handles so-called R-mode PCA, that is feature
extraction of variables. If a data matrix is supplie
On 19/10/2009, at 4:23 PM, milton ruser wrote:
Hi there,
Try ?subset
No. Don't.
Just do:
X <- dataframe[dataframe$Name=='T44',]
Note the comma in the penultimate position.
Read up on array indexing; see ?"[" and An Introduction to R,
sectio
I have build a model but want to then manipulate the coefficients in some
way.
I can extract the coefficients and do the changes I need, but how do I then
put these new coefficients back in the model so I can use the predict
function?
my_model <- lm(x ~ . , data=my_data)
my_scores <- predict(my
> points(x[4,],pch=2)# this is plotted as two points
drops what it sees as an unnecessary dimension.
Use
> points(x[4,, drop=FALSE], pch=2)
See FAQ 7.5
tmp <- matrix(1:2)
tmp
tmp[,1]
tmp[,1,drop=FALSE]
__
R-help@r-project.org mailing list
https://s
Hi Peng,
Comments below.
On Sun, Oct 18, 2009 at 9:22 PM, Peng Yu wrote:
> On Sun, Oct 18, 2009 at 5:42 PM, Matthieu Dubois wrote:
>> Hi,
>>
>> the blue point is not shown simply because it is printed outside
>> the current plot area. If you want to use the base graphics, you
>> have to manually
Hi there,
Try ?subset
?str may also be useful..
bests
milton
On Sun, Oct 18, 2009 at 11:10 PM, ANJAN PURKAYASTHA <
anjan.purkayas...@gmail.com> wrote:
> Hi,
> newbie question. I have a data-frame with 3 named columns: Name, Obs1,
> Obs2.
> The Name column members are made of alphanumeric chara
Hi,
newbie question. I have a data-frame with 3 named columns: Name, Obs1, Obs2.
The Name column members are made of alphanumeric characters: T1, T2, T3 etc.
I would like to acess only that subset of the data-frame with Name == T44.
X <- dataframe[dataframe$Name=='T44'] does not work.
Any ideas on
I would like to identify _almost_ duplicated rows in a data frame. For
example, I might declare as duplicates pairs of rows that are alike at about
80% of their columns. When working with tens of thousands of rows and upwards
of 20 columns an iterative approach, testing all permutations, can b
x=cbind(1:4,3:6)
png('one_point.png')
plot(x[1:3,],xlim=c(-1,11),ylim=c(-1,11),pch=1)
points(x[4,],pch=2)# this is plotted as two points
#although I meant only one point
legend("topleft", c("x","y"),pch=c(1,2))
dev.off()
The above code will produce 5 points instead of 4 points. If I want to
have 4
library(abind) ## array binding
__
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
Hi PT,
Try loading the lattice package first:
# install.packages('lattice')
require(lattice)
?cloud
HTH,
Jorge
On Sun, Oct 18, 2009 at 9:16 PM, PerfectTiling <> wrote:
>
> Hi,
>
> I installed the lattice package so I can plot 3D "cloud" scatterplots:
>
> > install.packages("lattice")
>
> But (
library(lattice)
Roy M.
On Oct 18, 2009, at 6:16 PM, PerfectTiling wrote:
Hi,
I installed the lattice package so I can plot 3D "cloud" scatterplots:
install.packages("lattice")
But (after successfully installing from the Berkeley mirror), R
insists it
cannot find the cloud function, p
On 19/10/2009, at 2:16 PM, PerfectTiling wrote:
Hi,
I installed the lattice package so I can plot 3D "cloud" scatterplots:
install.packages("lattice")
But (after successfully installing from the Berkeley mirror), R
insists it
cannot find the cloud function, part of the lattice package:
Hi,
I installed the lattice package so I can plot 3D "cloud" scatterplots:
> install.packages("lattice")
But (after successfully installing from the Berkeley mirror), R insists it
cannot find the cloud function, part of the lattice package:
> cloud
Error: object 'cloud' not found
What d
On Sun, Oct 18, 2009 at 5:42 PM, Matthieu Dubois wrote:
> Hi,
>
> the blue point is not shown simply because it is printed outside
> the current plot area. If you want to use the base graphics, you
> have to manually define the xlim and ylim of the plot. Legend is added
> with the command "legend"
CRAN (and crantastic) updates this week
New packages
* adaptTest (1.0)
Marc Vandemeulebroecke
http://crantastic.org/packages/adaptTest
The functions defined in this program serve for implementing adaptive
two-stage tests. Currently, four tests are included: Bauer and
Koehn
Hi,
I would like to add rows to arbitrary tables within a 3dimensional array.
I can directly add data to an existing row of a table:
> x <- array(0,c(1,3,2))> x[,,1] <- c(1,2,3)
And I can even add a row to the table and assign to another object.
> y <- rbind(x[,,1], c(4,5,6))
and 'y' is what I wan
On 10/19/2009 07:37 AM, Peng Yu wrote:
The following commands only show the data in 'y'. I'm wondering how to
show the data in 'x' as well. I also want to add a legend to show that
blue points corresponds to 'x' and yellow points correspond to 'y'.
Could somebody let me know what the correct comm
--- On Sun, 10/18/09, m...@z107.de wrote:
> From: m...@z107.de
> Subject: Re: [R] Putting names on a ggplot
> To: "John Kane"
> Cc: "R R-help"
> Received: Sunday, October 18, 2009, 6:05 PM
> hello,
>
> On Sun, Oct 18, 2009 at 08:29:19AM -0700, John Kane wrote:
> > Thanks Stefan, the annotat
Hi,
the blue point is not shown simply because it is printed outside
the current plot area. If you want to use the base graphics, you
have to manually define the xlim and ylim of the plot. Legend is added
with the command "legend".
E.g.
x=rbind(c(10,11),c(10,11))
y=cbind(-1:0,-1:0)
plot(y,co
On 10/17/2009 01:25 AM, Rajarshi Guha wrote:
Hi, I'd like to use a custom color sequence (black - low values, green -
high values) in am image() plot. While I can specify colors (say a sequence
of grays) to the col argument, the ordering is getting messed up. I have two
questions:
1. How can I
hello,
On Sun, Oct 18, 2009 at 08:29:19AM -0700, John Kane wrote:
> Thanks Stefan, the annotate approach works beautifully. I had not got
> that far in Hadley's book apparently :(
>
> I'm not convinced though that the explaination
>
> > you shouldn't use aes in this case since nampost,
> > temp
Dear R users
I have a data set which has five variables. One depenedent variable y, and 4
Independent variables (education-level, householdincome, countrygdp and
countrygdpsquare). The first two are data corresponding to the individual
and the next two coorespond to the country to which the indivi
The following commands only show the data in 'y'. I'm wondering how to
show the data in 'x' as well. I also want to add a legend to show that
blue points corresponds to 'x' and yellow points correspond to 'y'.
Could somebody let me know what the correct commands should be?
x=rbind(c(10,11),c(10,11
Maxwell Reback wrote:
I'd like to generate on a single device multiple plots, each of which
contains two plots. Essentially, I've got sub-plots which consist of
two tracks, the upper one displaying gene expression data, and the
lower one mapping position. I'd like to display four of these
two-t
Hello!
For those of you who have ever dealt with copulas in R, youcould maybe help
me. :
I have used R to fit a couple of bivariate Archimedean copulas to financial
data. R gives a parameter and a z-value and a third number that is
supposedly some kind of p-value.
An example of what I get after
On Fri, Oct 16, 2009 at 3:56 PM, Michael A. Gilchrist wrote:
> Hi Dieter,
>
> Thanks for the reply. I had played with the initial conditions, but
> apparently not enough. I finally found some that avoided the singularity
> issue. Many thanks.
>
> More generally, I went over the documentation ye
As a first try, use a bounds constrained method (L-BFGS-B or one from
the r-forge Optimizer project
http://r-forge.r-project.org/R/?group_id=395) and then add a penalty or
barrier function to your objective function to take care of the
x1+x2 < 1 (the other end is implicit in the lower bounds o
Peng Yu wrote:
>
> On Sat, Oct 17, 2009 at 3:28 PM, Peter Dalgaard
> wrote:
>> Ben Bolker wrote:
>>>
>>>
>>> Peng Yu wrote:
I am looking for a good probability book that describes convergence in
distribution. I have looked through Introduction to Probability by
Charles M. G
Thanks Stefan, the annotate approach works beautifully. I had not got that far
in Hadley's book apparently :(
I'm not convinced though that the explaination
> you shouldn't use aes in this case since nampost,
> temprange, ... are not
> part of the dataframe year.
makes sense since it seems to
Note your problem is equivalent to the unconstrained problem:
f(a1^2 / (a1^2 + a2^2), a2^2 / (a1^2 + a2^2), x3, x4, a3^2, a4^2)
optimizing over a1, a2, a3, a4, x3, x4. See the optimization task view
for specific functions:
http://cran.r-project.org/web/views/Optimization.html
On Sat, Oct
Apologies if this shows up a second time with uninformative header
(apparently it got filtered, but ...), as I forgot to replace the
subject line.
As a first try, use a bounds constrained method (L-BFGS-B or one from
the r-forge Optimizer project
http://r-forge.r-project.org/R/?group_id=395)
Madan Sigdel wrote:
Dear users
I have applied following for my works:
library(car)
x<-scan()
1: 0.92545
2: 0.89321
3: 0.9846
4: 2.9
5: 0.85968
6: 5.2
7: 4.66
8: 1.18788
9: 1.07683
10: 1.07683
11: 8.38
12: 7.423
13: 0.972
14: 3.73
15: 1.06474
16: 1.48
17: 0.92876
18: 2.26493
19: 0.85696
20:
see below.
On Sat, Oct 17, 2009 at 5:51 PM, Peng Yu wrote:
> On Sat, Oct 17, 2009 at 3:28 PM, Peter Dalgaard
> wrote:
>> Ben Bolker wrote:
>>>
>>>
>>> Peng Yu wrote:
I am looking for a good probability book that describes convergence in
distribution. I have looked through Introduc
On Sun, Oct 18, 2009 at 9:09 AM, Frank E Harrell Jr
wrote:
> Ista Zahn wrote:
>>
>> Dear list,
>> I've tried several times to wrap my head around the Design library,
>> without much success. It does some really nice things, but I'm often
>> uncomfortable because I don't understand exactly what it'
Ista Zahn wrote:
Dear list,
I've tried several times to wrap my head around the Design library,
without much success. It does some really nice things, but I'm often
uncomfortable because I don't understand exactly what it's doing.
Anyway, one thing I really like is the latex.ols() function, which
Dear users
I have applied following for my works:
> library(car)
> x<-scan()
1: 0.92545
2: 0.89321
3: 0.9846
4: 2.9
5: 0.85968
6: 5.2
7: 4.66
8: 1.18788
9: 1.07683
10: 1.07683
11: 8.38
12: 7.423
13: 0.972
14: 3.73
15: 1.06474
16: 1.48
17: 0.92876
18: 2.26493
19: 0.85696
20: 1.89313
21: 2.71
22:
On 17/10/2009 7:26 AM, Ajay Shah wrote:
How would I do something like this:
f <- function(x, g) {
s <- as.character(g) # THIS DOES NOT WORK
sprintf("The %s of x is %.0f\n", s, g(x))
}
Gabor showed you how to do it if you pass an expression which evaluates
to a function. If
On Wed, 2009-10-14 at 07:21 +0200, Christophe Dutang wrote:
> Hi all,
>
> I have a question regarding the memory usage for the attach function.
> Say I have a data.frame inputdat that I create with read.csv.
>
> I would like to know what happens on the memory side when I use
> attach(inputdata)
50 matches
Mail list logo