On Tue, 3 Jun 2008, Duncan Murdoch wrote:
On 03/06/2008 6:53 PM, Chin-Cheng Su wrote:
Hi everyone,
I use R to plot my data set (x,y) in Windows XP, but keep getting error
message like follows,
...
plot(x, y)
Error in windows() : unable to start device devWindows
How can I solve this prob
This indicates a serious problem with your build (a segfault).
Unfortunately as R is very well tested on Linux and we have never seen
this one reported, we have no clue as to why. You've told us very little
(what architecture, what compilers?) so although it seems to be something
specific to y
I am troubled by what appears to be a glitch in the current
distribution, or in
its installation on our system. I've traced it, and found a work-
around. Is
this normal? Is there a cleaner solution?
The problem:
During a package installation, the warning message "WARNING: ignoring
environmen
Thanks for your reply.
In your last step If I create a duplicate ( two similar records )
# create a duplicate
vv[8,1] <- 7
vv[8,2]<-'g'
and then I merge vv with vv2 ,both duplicates are merged. Is there a way to
tell R to merge only the unique records.
--
I don't think merge will do wha
Or with mapply
name <- c("foo", "bar", "baz")
val <- 1:3
mapply(assign, name, val, pos=1)
Cheers,
Simon.
On Tue, 2008-06-03 at 22:24 -0700, Moshe Olshansky wrote:
> You can use either assign or eval.
>
> Something like
>
> > name <- c("foo", "bar", "baz")
> > for (i in 1:length(name)) assign
You can use either assign or eval.
Something like
> name <- c("foo", "bar", "baz")
> for (i in 1:length(name)) assign(name[i],i)
--- On Wed, 4/6/08, Mark Farnell <[EMAIL PROTECTED]> wrote:
> From: Mark Farnell <[EMAIL PROTECTED]>
> Subject: [R] how to automatically create objects with names f
Suppose I have a string of objects names:
name <- c("foo", "bar", "baz")
and I would like to use a for loop to automatically create three
objects called "foo", "bar" and "baz" accordingly. Then how can this
be done" (so that in the workspace, foo = 1, bar = 2 and baz=3)
for (i in name) {
..
Try something like this:
fits <- list(500)
for (i in 1:500)
{
if (sum(table1$id == i) == 0) fits[[i]] <- NA
else fits[[i]] <- lm(y~t,data=table1,subset=(id==i))
}
--- On Wed, 4/6/08, Manli Yan <[EMAIL PROTECTED]> wrote:
> From: Manli Yan <[EMAIL PROTECTED]>
> Subject: [R] linear model in the re
How about
library(nlme)
allFits <- lmList(y ~ t|id, data=table1, pool=FALSE)
or
allFits <- by(table1, table1$id, function(x) lm(y ~ t, data=x))
Both ways store the results as a list, so you can access individual results
using list extraction.
--Matt
-Original Message-
From: [EMAIL
Or ?gsummary
Quoting Moshe Olshansky <[EMAIL PROTECTED]>:
Also check ?aggregate
--- On Wed, 4/6/08, Ingmar Visser <[EMAIL PROTECTED]> wrote:
From: Ingmar Visser <[EMAIL PROTECTED]>
Subject: Re: [R] splitting data frame based on a criteria
To: "Marvin Lists" <[EMAIL PROTECTED]>
Cc: r-help@r
here is the data:
y<-c(5,2,3,7,9,0,1,4,5)
id<-c(1,1,6,6,7,8,15,15,19)
t<-c(50,56,50,56,50,50,50,60,50)
table1<-data.frame(y,id,t)//longitudinal data
what I want to do is to use the linear model for each id ,then get the
estimate value,like:
fit1<-lm(y~t,data=table1,subset=(id==1))
but ,you c
Please look at what I tried,
> attach(my.data)
> options(device="windows")
> plot(x,y)
Error in windows() : unable to start device devWindows
>
However, as i tried something else, it went like
> options(device="devWindows")
> plot(x,y)
Error in plot.new() : no active or default device
>
Any id
Hello,
I would like to apply the EF function (a goodness of fit test between
predicted (ts2) and observed (Tw) values in the qualV package) to
each of the Sites in my data frame. However, when I try the following
script, R gives an error message that lists unused arguments, which
include th
Greetings,
I am wondering if anyone has written programs to automate model fitting
with the sem package, where one could specify a 'saturated' model and
sequentially fit models with different combinations of parameters
removed, while outputting fit data/parameters involved for each model.
Than
Dear William,
Following Jim Holtman's solution to your previous post, you can do something
similar to
Bill <- 1:100 # test data
Bill.p <- split(Bill, rep(1:10, each=10))
sapply(Bill.p, function(x) mean(x)/0.8)
1 2 3 4 5 6 7 8 9 10
6.875 19.
Dear Manli,
Try this:
table1[table1$treatment=="low" & table1$size=="large",]
HTH,
Jorge
On Tue, Jun 3, 2008 at 11:19 PM, Manli Yan <[EMAIL PROTECTED]> wrote:
> a table with three varialbe:treatment
> (low,high),size(large,small),response y
> I want all response y with treatment=low and s
a table with three varialbe:treatment
(low,high),size(large,small),response y
I want all response y with treatment=low and size=large,
I try to write as :
treatment<-c("low","low","high","high")
size<-c("small","large","small","large")
y<-c(1,2,4,5)
table1<-data.frame(treatment,size,y)
x=tab
Try this:
data.frame(x, y, folds = (x == y) + sign(x - y) * 2 ^ abs(x - y))
or replace data.frame with cbind if you prefer a matrix result.
On Tue, Jun 3, 2008 at 9:47 PM, ALAN SMITH <[EMAIL PROTECTED]> wrote:
> Hello R users and developers,
> I am trying to write several functions (fairly new a
This is just a slight modification of a question I asked earlier. Thanks to all
the responders.
I have a data set(Bill) of with 1 variable (var1), with 100 obs that are in
ascending order. I want to sample every 10 observations and save them in 10
different groups such as Group1 is obs 1-10
Hi Alan,
> -Original Message-
> From: [EMAIL PROTECTED] on behalf of ALAN SMITH
> Sent: Tue 6/3/2008 6:47 PM
> To: r-help@r-project.org
> Subject: [R] help understanding why #function(x,y) (if((x-y)>=0) {2^(x-y)}
> else{-(2^abs(x-y))})# doesn't work likeI think it should
>
> Hello R use
Alan -
ALAN SMITH wrote:
Hello R users and developers,
I am trying to write several functions (fairly new at this) in order
to avoid using loops on large data frames (because they are slow). I
wrote the function below and it seems to get hung on the first part of
the if statement and then appli
Use ifelse() rather than if () {} else {}. It's vectorized and very
useful for applying to elements along vectors. The latter idiom is much
better for control of flow in programs and functions.
folds <- function (x, y) ifelse(x-y >= 0, 2^(x-y), -(2^abs(x-y)))
z <- folds(x, y)
> z
[1] 161
This is an FAQ (although it doesn't seem to be listed in the official
FAQs.
The ``if'' command compares scalars (only, in effect).
See ?"if"
You need to use the ifelse() function:
folds <- function(x,y) ifelse(x-y>=0,2^(x-y),-2^(y-x))
This if for illustrative purposes only. The foregoing
<-fit1$coefficients
y.control y.lowy.high
(Intercept)19.628713 21.883999 20.023814
log(1 + (age - 45)/10) -7.383725 -6.017342 -5.084431
here is my outcome,I need one vector say b1=first row without the intercept
,like:(19.628713, 21.883999, 20.023814)
and
Hello R users and developers,
I am trying to write several functions (fairly new at this) in order
to avoid using loops on large data frames (because they are slow). I
wrote the function below and it seems to get hung on the first part of
the if statement and then applies that condition to rest of
Will this do it for you:
> Bill <- 1:100 # test data
> # partition
> Bill.p <- split(Bill, rep(1:10, each=10))
> Bill.p
$`1`
[1] 1 2 3 4 5 6 7 8 9 10
$`2`
[1] 11 12 13 14 15 16 17 18 19 20
$`3`
[1] 21 22 23 24 25 26 27 28 29 30
$`4`
[1] 31 32 33 34 35 36 37 38 39 40
$`5`
[1] 41 42 4
One possibility is:
x <- ceiling((1:100)/10)
aggregate(var1,by=list(x),mean)
--- On Wed, 4/6/08, William Pepe <[EMAIL PROTECTED]> wrote:
> From: William Pepe <[EMAIL PROTECTED]>
> Subject: [R] Question about subsetting data
> To: r-help@r-project.org
> Received: Wednesday, 4 June, 2008, 10:35 A
Where do you want to place ID's which are in data2 but NOT in data1?
--- On Wed, 4/6/08, kayj <[EMAIL PROTECTED]> wrote:
> From: kayj <[EMAIL PROTECTED]>
> Subject: [R] merge two data sets
> To: r-help@r-project.org
> Received: Wednesday, 4 June, 2008, 9:45 AM
> I would like to merge “data1 “th
Hey,
The following is a function I wrote which generates random variables from a
Kappa (2-parameter) distribution.
rkappa <- function(n,beta,alpha){
if(alpha <= 0)
stop("alpha must be greater than zero!")
if(beta <= 0)
stop("beta must be greater than zero!")
Vec <- beta*exp((1/alpha)*(log(
On Sat, May 31, 2008 at 2:45 PM, Peter Dalgaard
<[EMAIL PROTECTED]> wrote:
> Paul Johnson wrote:
>>
>> Hell
> (1) par(xpd=TRUE) allows you to write outside the plotting region
>
> O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B
As usual, PD right on the money. Here's a working
I have a data set(Bill) of with 1 variable (var1), with 100 obs that are in
ascending order. I want to sample every 10 observations and save them in 10
different groups such as
Group1 is obs 1-10
Group 2 is obs-11-20
and so on.
First step is to subset them into the 10 groups, then calc
On 03/06/2008 6:53 PM, Chin-Cheng Su wrote:
Hi everyone,
I use R to plot my data set (x,y) in Windows XP, but keep getting error message
like follows,
...
plot(x, y)
Error in windows() : unable to start device devWindows
How can I solve this problem? Thanks for any suggestion or help.
Som
Here is a variation of the example below which uses
your data. Paste this into an R session:
Lines <- "19:08:15 %usr %nice %sys %idle
19:08:165 0 10 86
19:08:17 17 0 14 69
19:08:185 0 8 87
19:08:19 10 0 10 81
19:08:203
Hello all,
I've become confused by the output produced by a call to
anova(model1,model2). First a brief background. My model used to predict
final tree height is summarised here:
Df Sum Sq Mean Sq F valuePr(>F)
Treatment 2 748.35 374.17 21.30
I would like to merge “data1 “that contains 100 unique ID’s with another
data set “data 2” with 150 ID’s and the age of those individuals ( the ID in
data1 is a subset of the ID in data 2) I would like to merge these data1
with data2 and have the result of the merge to have the ID ordered as in
Hi,
Added "-Wl,-bnoquiet" in Makeconf and executed 'make'. The following error
occured:
gcc -std=gnu99 -I. -I../../../src/include -I../../../src/include
-I/usr/local/include -DHAVE_CONFIG_H -mno-fp-in-toc -g -O2 -c Lapack.c -o
Lapack.o
gcc -std=gnu99 -Wl,-brtl -Wl,-G -Wl,-bex
Hi,
Installed GCC 4.2.4 on IBM-AIX 5.2 and configured 'R' successfully. Although
the below error was resolved after installing GCC 4.2.4, the 'make' failed
in another step (related msg posted on June 03).
Senthilkumaran wrote:
>
> Hi,
> Thanks for the response.
> We do have a IBM XL Fortran
Hi everyone,
I use R to plot my data set (x,y) in Windows XP, but keep getting error message
like follows,
>...
> plot(x, y)
Error in windows() : unable to start device devWindows
>
How can I solve this problem? Thanks for any suggestion or help.
CC
_
Since k_i(l,m,s) are known constants, you actually have a system of four
non-linear equations with 4 unknowns.
One possibility is to use optim (check ?optim).
Another one is to use the very recently released package - look at
https://stat.ethz.ch/pipermail/r-help/attachments/20080423/da0b7f6c/
On Tue, 3 Jun 2008, Demetri S. Mouratis wrote:
Hi,
I'm trying to plot time-series data where each sample breaks down the
percentage of CPU time spent in each of four states (usr, nice, sys, idle)
19:08:15 %usr %nice %sys %idle
19:08:165 0 10 86
19:08:17 17 0
Hi,
I'm trying to plot time-series data where each sample breaks down the
percentage of CPU time spent in each of four states (usr, nice, sys,
idle)
19:08:15 %usr %nice %sys %idle
19:08:165 0 10 86
19:08:17 17 0 14 69
19:08:185 0 8 87
Also check ?aggregate
--- On Wed, 4/6/08, Ingmar Visser <[EMAIL PROTECTED]> wrote:
> From: Ingmar Visser <[EMAIL PROTECTED]>
> Subject: Re: [R] splitting data frame based on a criteria
> To: "Marvin Lists" <[EMAIL PROTECTED]>
> Cc: r-help@r-project.org
> Received: Wednesday, 4 June, 2008, 5:11 A
Dirk Eddelbuettel wrote:
>
>
> On 3 June 2008 at 13:44, g-h-d wrote:
> | > | > $ sudo apt-get install sun-java6-jdk
> | > | >
> | > | > $ sudo update-alternatives --config java
> | > | >
> | > | > There are 5 alternatives which provide `java'.
> | > | >
> | > | > Selection Alternative
> | >
Hi,
The following error occurs while executing 'make' after the successful
configuration (./configure) on IBM-AIX 5.2 (GCC 4.2.4 installed):
gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2
-I../../src/extra/pcre -I. -I../../src/include -I../../src/include
-I/usr/local/in
Thanks for your reply.
In your last step If I create a duplicate ( two similar records )
# create a duplicate
vv[8,1] <- 7
vv[8,2]<-'g'
and then I merge vv with vv2 ,both duplicates are merged. Is there a way to
tell R to merge only the unique records.
Thanks and appreciate your help.
--
> "c" == cgenolin <[EMAIL PROTECTED]>
> on Wed, 04 Jun 2008 00:30:08 +0200 writes:
c> I find the problem: the name of my base directory (the
c> one that contain R, man and test) was not the same than
c> the name of the package...
Aha!
c> I thaught this was allowed, I
> From: Nathan Coulter
>
> It looks like the command above could use /lib64/libc.so.6, but running "R
> CMD
> javareconf" shows that JNI linker flags don't contain any entry similar to
> '-L/lib64':
It turns out that /usr/lib64/libc.so is what is needed. I was able to install
rJava after a
I find the problem: the name of my base directory (the one that contain
R, man and test) was not the same than the name of the package...
I thaught this was allowed, I guess I was wrong.
Christophe
"c" == cgenolin <[EMAIL PROTECTED]>
on Tue, 03 Jun 2008 09:55:15 +0200 writes:
>> pro
On 3 June 2008 at 13:44, g-h-d wrote:
| > | > $ sudo apt-get install sun-java6-jdk
| > | >
| > | > $ sudo update-alternatives --config java
| > | >
| > | > There are 5 alternatives which provide `java'.
| > | >
| > | > Selection Alternative
| > | > --
zoo has a namespace and lag.zoo is not exported so zoo:::lag.zoo
is how to access it directly.
See
help(":::")
On Tue, Jun 3, 2008 at 4:31 PM, jiho.han <[EMAIL PROTECTED]> wrote:
>
> hello, useRs-
>
> i have a function that i wrote myself, for example, lag(x). however, when
> i load 'zoo' pack
Greetings,
I am working in the sem package on a model with 3 exogenous variables (2
are nominal-categorical), and 4 endogenous, continuous variables. To
use sem with the nominal variables, I created dummy variables. Now, in
my sem output I have estimates for path coefficients for the
relatio
Dirk Eddelbuettel wrote:
>
>
> On 3 June 2008 at 08:42, g-h-d wrote:
> | I basically followed the steps in http://lib.stat.cmu.edu/R/CRAN/, and
> those
> | below for JGR and it worked.
> |
> | ...but there are problems with help files e.g. ?matrix generates the
> | following message:
> |
> |
Hello,
I am fairly new to using R and am trying to install it on my Linux
machine, running Scientific Linux. I get through running 'configure'
and 'make' OK, but when I run 'make check', I get the following error:
make check
make[1]: Entering directory `/home/gruchti/Programs/R-2.7.0/test
hello, useRs-
i have a function that i wrote myself, for example, lag(x). however, when
i load 'zoo' packages and try to lag 'zoo' object, it gave me error. (R try
to
pass 'zoo' object into my function.)
i typed 'lag.zoo' in R, but it can't find it. how can i access 'lag.zoo'
function?
and in
I have been using separate environments to partition my data and functions
into logical groups but I have been having an odd (to me) problem.
To load and manipulate the data environments, I wrote a couple of small
functions (see below). The problem seems to be that when I initially try to
load the
Hi Jorge,
Have you tried to use "systemfit" package. In this package, this is a
function call " nlsystemfit ". This might help.
Chunhao
Quoting Jorge Ivan Velez <[EMAIL PROTECTED]>:
Dear R-list members,
I've had a hard time trying to solve a non-linear system (nls) of equations
which st
Dear R-list members,
I've had a hard time trying to solve a non-linear system (nls) of equations
which structure for the equation i, i=1,...,4, is as follows:
f_i(d_1,d_2,d_3,d_4)-k_i(l,m,s) = 0(1)
In the expression above, both f_i and k_i are known functions and l, m and s
Paul
It is not entirely clear to me what you want to do. However, if you are
wanting to add row names then try
row.names(dat) <- paste('g', 1:nrow(dat), sep='')
First twenty rows of columns 1:3 are obtained by
dat[1:20,1:3]
Regarding putting all the points in a column onto a scatterplot. One
Dear Thomas
Yes, you're right. But I'm looking for this not only for computational cost
reasons.
eigen function from R has identical behavior to matlab function eig, but not
to eigs.
Even in matlab you can check that those function are not giving identical
results.
Here you have a short example
Dear Michael,
I don't think that anyone else has suggested a fix, so here's one:
snip ---
# Mahalanobis Dsq for a matrix of variables
dsq <- function(x, Sigma) {
if (missing(Sigma)) Sigma <- cov(x, use="complete.obs")
dev <- scale(x, scale=FALSE)
# DSQ <- dev %*% solve(Si
?by may be helpful here
eg if dat is your data.frame and yf is a factor (created using ifelse)
use by(dat,yf,mean) to compute the means for each level of yf
hth, Ingmar
On Jun 3, 2008, at 8:37 PM, Marvin Lists wrote:
Hi,
I have a data frame that I want to split into two based on the
values of
Hello to everyone,
I have a general question about how to add a column to a table.I have a table
that has 62 columns and 2000 rows.I am wanting to add a column on the left most
row.I am wanting to label the rows g1 to g2000 I have the code of
("g",c(1:nrow(dat)),sep="") for the right side of the
Hi,
I have a data frame that I want to split into two based on the values of a
variable in it.
The variable Y has numeric values ranging between 0 through 70. I want to
plot the frequencies of another variable X in two different cases:
- When Y = 0 and
- When Y > 0
How does one go about doing thi
On 3 June 2008 at 08:42, g-h-d wrote:
| I basically followed the steps in http://lib.stat.cmu.edu/R/CRAN/, and those
| below for JGR and it worked.
|
| ...but there are problems with help files e.g. ?matrix generates the
| following message:
|
| /tmp/RtmpvxsnQa/.R/doc/html/packages.html (No such
Dear R users
I tried a lot to solve the following problem but could not. I have two arrays
having same order i.e 1 by 150.
j=10; ss=150; r=array(0 , c( j , ss )); rr=array(0 , c( j , ss )); r1=array(0 ,
c( j-1 , ss )); r2=array(0 , c( j-1 , ss ));
r3=array(0 , c( 2 , ss ))
for(i in 1:j-1){
attempting to install rJava on R-2.7.0, x86_64 platform, config.log shows the
following error:
configure:3880: checking whether JNI programs can be compiled
configure:3898: gcc -m64 -std=gnu99 -o conftest -g -O2
-I/path/to/x86-64-linux/jdk-1.6.0_06/jre/../include conftes
Presumably the original poster was looking for a function that would compute
just the largest five eigenvalues and associated vectors, because that is
enormously more efficient for a large matrix than computing all of them.
eigen() computes all of them.
One way to compute just a few is to use
hi ladyes and gentlemans of the R comunity.
i have the following graphical issue:
# say y is a matrix or a dataframe with
dim(51,nrow=17),hence 3 columns;
l<-51
# now the 3 colums represents 3 different aspects of
my continuous variable (3 factors),plotted against a
categorical one;
n<-levels(fa
Jorge Ivan Velez wrote:
Dear John,
Assuming that your information is in the list x, does
substr(x,1,2)
work for you?
HTH,
Jorge
thanks for your reply Jorge. i will try substr().
john
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mai
Michael Dewey wrote:
split() where the f variable =
c("1E-*","1W-*","2E-*","2W-*","5E-*","5W-*","7E-*","7W-*","CE-*","CW-*"),
but * doesn't work as a wildcard as i had hoped. can someone tell me
the appropriate wildcard character/symbol to use, please
Did you really use split()?
yes, i did. t
Hi.
I am running a gam for covariate forward inclusions/ backward exclusions,
using the weight options as follow.
library(gam)
gam.object1<-gam(ET~1, data=nonp.dat, weights=PROBA)
summary(gam.object1)
step.object1<-step.gam(gam.object1, direction="both" , trace=T,
Dear Prof Ripley,
> > Hello,
> >
> > I am interested in performing a 2D loess smooth on microarray data, i.e.
> > log2 ratios on a 2D grid, using different spans in the horizontal and
> > vertical directions (the immediate reason being that replicate spots are
> > laid out in the horizontal direct
That is actually from August 2007 (typo in the fortunes package).
If you do
> RSiteSearch('Thou Shalt Not Even Think Graph Spreadsheet')
Then it will bring up the actual post and you can read it in context (along
with the posts that lead to it and those that followed).
Basically, Ted was tryin
Thanks.
I basically followed the steps in http://lib.stat.cmu.edu/R/CRAN/, and those
below for JGR and it worked.
...but there are problems with help files e.g. ?matrix generates the
following message:
/tmp/RtmpvxsnQa/.R/doc/html/packages.html (No such file or directory)
g-h-d wrote:
>
> H
Hi,
I noticed the following fortune in R 2.7 and 2.6.2:
fortune('Spreads')
If anything, there should be a Law: Thou Shalt Not Even Think Of Producing A
Graph That Looks Like Anything From A Spreadsheet.
-- Ted Harding (in a discussion about producing graphics)
R-help (August 2008)
Jus
Thanks might be easier in my case because I have so many variables.
Could have found this solution on my own.
Birgit
Rogers, James A [PGRD Groton] wrote:
>
>
> Birgit Lemcke wrote:
>
>> I have a dataframe and two of my variables are in the wrong position
>> and I would like to swap those va
Your R is way too old: please follow the advice in the posting guide.
I suspect the current JavaJD requires R >= 2.7.0 from the errors you are
getting below.
On Tue, 3 Jun 2008, g-h-d wrote:
Hi all,
i'm trying to install JGR on linux (see bottom), but it runs into errors.
The bottom of the
"Jorge Ivan Velez" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Dear kayteck,
>
> Function eigen (see ?eigen) will do what you want.
>
> HTH,
He had looked, but since eigen returns both eigenvalues and
eigenvectors, and does so in a list, perhaps he needs advice about how
to extrac
S Ellison a écrit :
As a work-round, try something lik
test.function <- function (formula.str, data) {
weights <- rep(.1, 8)
rpart(as.formula(formula.str), data, weights)
}
which works if formula.str is a string instead of a formula object.
Ok, I think I got the point. The only problem
Hi all,
i'm trying to install JGR on linux (see bottom), but it runs into errors.
The bottom of the sequence below shows "JavaJD could not be found"
Any suggestion, please?
$ sudo apt-get install sun-java6-jdk
$ sudo update-alternatives --config java
There are 5 alternatives which provide `j
Dear Miha,
a general way to do this is as follows:
Define a distance measure by aggregating the
Euclidean distance on the (X,Y)-space and the trivial 0-1 distance (0 if
category is the same) on the categorial variable. Perform cluster analysis
(whichever you want) on the resulting distance mat
Paul,
Thanks very much! Your example code below shows exactly how to do what I wanted.
-Ben
p.s., For the record,
transRight <- current.transform()
after the second call to pushViewport() seems to have gotten deleted from you
example code below, but that was obvious.
> -Original Message
Dear kayteck,
Function eigen (see ?eigen) will do what you want.
HTH,
Jorge
On Tue, Jun 3, 2008 at 5:42 AM, kayteck_master <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> Does anybody know how one can compute d largest eigenvalues/eigenvectors in
> R, like in MATLAB eigs function ? eigen function co
Maura E Monville gmail.com> writes:
>
> Please, can someone suggest me where to find a description for the
> attributes of the summary of "regsubsets",
> that is:
> "which" "rsq""rss""adjr2" "cp" "bic""outmat" "obj" ??
The docs say:
"An object of class "regsubsets" containi
Birgit Lemcke wrote:
> I have a dataframe and two of my variables are in the wrong position
> and I would like to swap those variables.
In addition to the other solutions posted, if you prefer to reference
the columns by name rather than by index, you could use subset()
dat <- data.frame(a =
Dear all,
I would like to perform a clustering analysis on a data frame with two
coordinate variables (X and Y) and a categorical variable where only a != b can
be established. As far as I understood classification analyses, they are not
an option as they partition the training set only in k c
A bit of fiddling suggests that the problem is less to do with rpart
(which will quite happily acept weights defined inside a function) and
more to do with the formula argument to the test function.
This is probably because defining the formula in the global environment
(as you implicitly do by pl
I noticed that both in the fArma and fracdiff packages it is not possible to
predict an object fitted with an ARFIMA model. Moreover, the ox link is no
more available.
However, is it possible to find the coefficient d of differentiation of a
time series, and then predict the time series by apply
At 03:07 03/06/2008, john.polo wrote:
hello all,
i want to split a list into smaller lists. the list looks like this:
CW-W730 CW-W720 CW-W710 CW-W700 CW-W690 CW-W680 CW-W670
CW-W660
CE-W997 CE-W987 CE-W977 CE-W967 CE-W956 CE-W944 CE-W934
CE-W924 7W-W760 7W-W750 7W-967W-941
'weights' should be a column in your 'data': that is the standard way to
specify weights to a model-fitting function.
On Tue, 3 Jun 2008, Xavier Robin wrote:
I can't get rpart accept case weights defined inside a function.
It keeps using the copy defined in the "global" environment (if they ex
Hello, this is the first time I send a mail to r-help mailing list.
I'm developing a program in java with calls in R and I can`t use jri 0.4-1
with R 2.7 or 2.6 .but it runs with 2.4.
The problem that I get when using the latest version of R is as follows:
Cannot find JRI native library!
Please
Hello
Does anybody know how one can compute d largest eigenvalues/eigenvectors in
R, like in MATLAB eigs function ? eigen function computes all
eigenvectors/eigenvalues, and they are slightly different than those
generated by matlab eigs.
Thanks in advance
--
View this message in context:
htt
Dear all,
I'm trying to generate latex-formatted tables for panel data regressions
using the mtable function of the memisc package, which is quite good. I
use the plm package for panel data regression. Unfortunately, it seems
that mtable works very well when using either lm or glm, but it
enc
I can't get rpart accept case weights defined inside a function.
It keeps using the copy defined in the "global" environment (if they
exists) instead of the function-defined ones.
Here is what I do:
test.function <- function (formula, data) {
weights <- rep(.1, 100)
rpart(formula, data, we
> "c" == cgenolin <[EMAIL PROTECTED]>
> on Tue, 03 Jun 2008 09:55:15 +0200 writes:
>> provide commented, minimal, self-contained, reproducible code.
>> Please do -- both --
c> Sorry... Usualy, I do...
c> --- 8<
c> userA <- function(x)x+1
c>
Thank everybody for the answers! The stop and quit functions are what I
need (it is a script, not a function what needs to be terminated. I was
talking about an "exit" function, what can be confusing).
Best,
Federico
Gregory. R. Warnes wrote:
>
> Since Frederico indeicated he was running a scrip
provide commented, minimal, self-contained, reproducible code.
Please do -- both --
Sorry... Usualy, I do...
--- 8<
userA <- function(x)x+1
privateA <- function(x)x+2
.userB <- function(x)x+10
.privateB <- function(x)x+20
userC<- function(x)userA(privateA(x))
private
Hi Chip
Maybe some more experienced users can direct you to proper source of
information but in case of programming there are several books which can
be of some use (I do not have any of them so its only my guess from their
names). See items 1, 3 and 5 from CRAN Books page.
Regards
Petr
[EM
Please, can someone suggest me where to find a description for the
attributes of the summary of "regsubsets",
that is:
"which" "rsq""rss""adjr2" "cp" "bic""outmat" "obj" ??
Thank you so much.
--
Maura E.M
[[alternative HTML version deleted]]
_
On Tue, Jun 03, 2008 at 10:37:33AM +1000, Jason Lee wrote:
> Hi,
>
> If there are more than one item having the same value, how can i use R to
> take the average of the position. E.g:-
>
>X Y Z
> 131 22.2 3.4 4.4
> 132 20.0 3.4 4.4==>Position 2 if queried
> 150 20.0 12.2 4.5
1 - 100 of 102 matches
Mail list logo