You need to see the config.log for foreign. To do so, please
1) unpack src/library/Recommended/foreign.tgz in say /tmp
2) Run /path/to/R_HOME/bin/R CMD INSTALL /tmp/foreign
3) Look in /tmp/foreign/config.log
HOWEVER, you still seem to have -m64 in foreign.ts.out: R is not going to
have put that
>>Hi!
>>
>>I am trying to get the tick / label under a stacked
>>boxplot with only a single
>>data row. With >=2 rows it works, but with a single
>>one the tick resp. my class
>>name is not printed below the boxplot. Can anybody
>>point me to what am I doing
>>wrong?
>>
>>For example:
>>boxplot(
On Wednesday 20 April 2005 00:17, array chip wrote:
> Hi all,
>
> In Tibshirani's PNAS paper about nearest shrunken
> centroid analysis of microarrays (PNAS vol 99:6567),
> they used cross validation to choose the amount of
> shrinkage used in the model, and then test the
> performance of the model
Sorry, I was doing this too late last night!
All stands as before except for the calculation at the end
which is now corrected as follows:
On 19-Apr-05 Ted Harding wrote:
[code repeated for reference]
> The following function implements the above expressions.
> It is a very crude approach to solvi
Dear all,
I'm trying to get a two dimensional embedding of some data using different
meythods, among which princomp(), cmds(), sammon() and isoMDS(). I have a
problem with sammon() because the coordinates I get are all equal to NA.
What does it mean? Why the method fails in finding the coordinates?
Dear useR help,
This is below my toy dataset,
age married income gender
young nolow female
old yeslow female
mid no high female
young yes high female
mid yes high female
mid no medium female
old no medium female
young yes mediu
Hello all,
Do you know of convenient functions that can do:
1) a fit "f(x)" of data points with a spline, and *then*
2) weighted fits of other data points ** with a model of the form
a*f(x-x0) **? [i.e., the goal is to find a and x0, ideally with their
covariance matrix], and
3) if possible,
maybe something like this could be helpful
f <- function(..., ref){
lis <- list(...)
for(i in seq(along=lis)){
x <- lis[[i]]
r <- match(ref[i], x)
lis[[i]] <- x[c(r, seq(along=x)[-r])]
}
lis
}
#
age <- c("young", "mid", "old")
married <- c("no", "yes")
incom
On Wed, 2005-04-20 at 10:35 +0200, Domenico Cozzetto wrote:
> Dear all,
> I'm trying to get a two dimensional embedding of some data using different
> meythods, among which princomp(), cmds(), sammon() and isoMDS(). I have a
> problem with sammon() because the coordinates I get are all equal to NA.
I'd like to thank the developers in the Core Team for their great
work! R has become an invaluable and indispensible tool for (at least)
me, much thanks to the hard and good work of the Core Team.
--
Bjørn-Helge Mevik
__
R-help@stat.math.ethz.ch maili
Yes, this is exactly what I want.
Many thanks and best regards,
Jan Sabee
On 4/20/05, Dimitris Rizopoulos <[EMAIL PROTECTED]> wrote:
> maybe something like this could be helpful
>
> f <- function(..., ref){
> lis <- list(...)
> for(i in seq(along=lis)){
> x <- lis[[i]]
>
Hello,
I'm working with the function optim() from stats
package,
and inside this function is called the function
.Internal(optim()) and I want to get the code of
this function which would help me to understand why
the Nelder-Mead algorithm doesn't converge with my
data.
I'm working under Windo
Thanks for the attention paid to my rpoblem. Please find enclosed
the matrix with my dissimilarities. This is the only case in
which sammon(), from the MASS package, gives me this kind of problems.
Domenico
>
> > -Messaggio originale-
> > Da: Jari Oksanen [mailto:[EMAIL PROTECTED]
> > Invi
On Wed, 20 Apr 2005, Alban wrote:
> Hello,
>
> I'm working with the function optim() from stats
> package,
> and inside this function is called the function
> .Internal(optim()) and I want to get the code of
> this function which would help me to understand why
> the Nelder-Mead algorithm doe
Hi,
Sorry if the answer is really simple. But I'm looking for a expandable
tree visualisation (like file organisation with plus or minus sign on
the left to expand the tree). As the file is quite big. ~12000 rows.
and with possible 5 layers (so there are index numbers like 1.1.1.1.1
to make the
Jan Sabee wrote:
Dear useR help,
This is below my toy dataset,
age married income gender
young nolow female
old yeslow female
mid no high female
young yes high female
mid yes high female
mid no medium female
old no medium female
you
On 20-Apr-05 Mike White wrote:
> Ted
> Thank you for giving me so much of your time to provide
> an explanation of the likelihood ratio approach to the
> calibration problem. It has certainly provided me with a
> new insight into this problem. I will check out the
> references you mentioned to get
Dear All,
we (Ott Toomet and I) would like to add functions for maximum likelihood (ML)
estimations of generalized tobit models of type 2 and type 5 (*see below) in
my R package for microeconomic analysis "micEcon". So far we have called
these functions "tobit2( )" and "tobit5( )".
Are these
Many thanks Jim.
This is the others kind of a random row which I can use.
Best wishes,
Jan Sabee
> Assumptions:
> 1) the object is a data frame.
> 2) all variables are factors (although I have CMA).
> 3) you want a list containing vectors of the levels for each value in
> which the first level is
> "Andy" == Andy Bunn <[EMAIL PROTECTED]>
> on Tue, 19 Apr 2005 10:27:04 -0400 writes:
.
Andy> is.tuesday <- as.POSIXlt(Sys.time())$wday == 2
Andy> if (is.tuesday == T) { }
.
aaah, this really hurts my eyes or rather the brain behind!
And it's by far not t
Arne:
> we (Ott Toomet and I) would like to add functions for maximum
> likelihood (ML) estimations of generalized tobit models of type 2 and
> type 5 (*see below) in my R package for microeconomic analysis
> "micEcon". So far we have called these functions "tobit2( )" and
> "tobit5( )". Are the
Martin Maechler <[EMAIL PROTECTED]> writes:
> 'T' and 'F' instead of 'TRUE' and 'FALSE' -
> which is against all recommendations, since
> F <- TRUE
> T <- FALSE
> are valid statements, probably not common, but think what
> happens when you accidentally have the equivalent of "T <- 0"
> s
This is really an R-devel question, but R-help readers may have wondered
about this.
Alban wrote:
Hello,
I'm working with the function optim() from stats
package,
and inside this function is called the function
.Internal(optim()) and I want to get the code of
this function which would help me
On Wed, 20 Apr 2005 14:30:49 +0200 Martin Maechler wrote:
> > "Andy" == Andy Bunn <[EMAIL PROTECTED]>
> > on Tue, 19 Apr 2005 10:27:04 -0400 writes:
>
> .
> Andy> is.tuesday <- as.POSIXlt(Sys.time())$wday == 2
> Andy> if (is.tuesday == T) { }
> .
>
> aaah,
> "Marc" == Marc Schwartz <[EMAIL PROTECTED]>
> on Tue, 19 Apr 2005 21:26:47 -0500 writes:
Marc> On Wed, 2005-04-20 at 02:08 +0200, Werner Wernersen wrote:
>> Hi!
>>
>> I am trying to get the tick / label under a stacked
>> boxplot with only a single
>> data r
Martin Maechler wrote:
> More generally, please, please, everyone :
>
> Replace
> if (something == TRUE)
> withif (something)
> and
> if (something.or.other == FALSE)
> withif (!something.or.other)
Amen! And right on! And you tell 'em!
On Wednesday 20 April 2005 14:31, Achim Zeileis wrote:
> Arne:
> > we (Ott Toomet and I) would like to add functions for maximum
> > likelihood (ML) estimations of generalized tobit models of type 2 and
> > type 5 (*see below) in my R package for microeconomic analysis
> > "micEcon". So far we ha
Greetings.
I have been using S-Plus for many years now (>13) and have recently
started to use R as well. I have been interested in R for sometime, but
until recently, have not been in a position to devote much time to it,
but I digress.
Besides some of the more technical differences between R
Hi all,
Ive to solve the following problem:
I have a dataset with count data. For these data Ive chosen some standard
distributions (poisson, negBin, Bin) and have estimated the parameters. Now
I want to execute a X²-Test of the contingency table vs. the parameterized
distribution.
Ok
On Wednesday 20 April 2005 14:48, you wrote:
> For what it is worth, I agree fully with Achim's view of naming
> conventions, and also feel that it would be nice to connect these
> fitting methods with the survival stuff, just to cut down on the sense
> that econometrics and biostatistics represe
Hi
I am performing an analysis of variance with two factors, each with two
levels. I have differing numbers of observations in each of the four
combinations, but all four combinations *are* present (2 of the factor
combinations have 3 observations, 1 has 4 and 1 has 5)
I have used both anova(aov
Ted
Thank you for giving me so much of your time to provide an explanation of
the likelihood ratio approach to the calibration problem. It has certainly
provided me with a new insight into this problem. I will check out the
references you mentioned to get a better understanding of the statistics.
On Wed, 2005-04-20 at 11:08 +0100, Prof Brian Ripley wrote:
> On Wed, 20 Apr 2005, Werner Wernersen wrote:
>
> > I also tried to look into the source code of boxplot()
> > but when I type "boxplot"
> > R returns only
> >
> > function (x, ...)
> > UseMethod("boxplot")
> >
> >
> > instead of the fu
Thanks for the attention paid to my rpoblem. Please find enclosed
the matrix with my dissimilarities. This is the only case in
which sammon(), from the MASS package, gives me this kind of problems.
I'm using the implementation of sammon provided by the package MASS and the
starting configuration is
> From: michael watson (IAH-C)
>
> Hi
>
> I am performing an analysis of variance with two factors,
> each with two
> levels. I have differing numbers of observations in each of the four
> combinations, but all four combinations *are* present (2 of the factor
> combinations have 3 observations,
michael watson (IAH-C) wrote:
Hi
I am performing an analysis of variance with two factors, each with two
levels. I have differing numbers of observations in each of the four
combinations, but all four combinations *are* present (2 of the factor
combinations have 3 observations, 1 has 4 and 1 has 5
Hello there,
I am creating a series of images using levelplot but I also want to
overlay a contour for a particular value as reference. Here is the
levelplot command for the image:
print(levelplot(d~x+y,data=t,cuts=20,scales=list(draw=F),xlab=NULL,ylab=
NULL,col.regions=heat.colors(100)[100:1
Thanks for the response. Answers to your questions in turn:
My null hypothesis is that these is no difference between the treatment
means. I guess that makes my alternative there is a difference.
I understand all about interactions, and yes, there's an interaction
term in my model. Moreover, i
Dear all,
I'm reading data via the RODBC connection using
odbcConnectExcel. I use sqlFetch(channel, "sheetx") to
identify the correct tab. It appears to read the data
without any problems. However, when I exact a portion
of data - the row number specified is 1 less than in
the actual excel file a
On Wed, 2005-04-20 at 12:35 +0200, Domenico Cozzetto wrote:
> Thanks for the attention paid to my rpoblem. Please find enclosed
> the matrix with my dissimilarities. This is the only case in
> which sammon(), from the MASS package, gives me this kind of problems.
> I'm using the implementation of s
> the row number specified is 1 less than in the actual excel file
At a guess I'd say this is because the row 1 in excel is taken as the
column heads for the data in R
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r
I hope to be making some substantial progress on this over summer.
But I would not hold up any projects in anticipation of major R
changes--the current recommended strategy of first writing something
that is correct, profiling to find out where a performance problem is
if there is one, and then (ma
I guess the real problem is this:
As I have a different number of observations in each of the groups, the
results *change* depending on which order I specify the factors in the
model. This unnerves me. With a completely balanced design, this
doesn't happen - the results are the same no matter wh
On Wednesday 20 April 2005 09:16, Jorge Ahumada wrote:
> Hello there,
>
> I am creating a series of images using levelplot but I also want to
> overlay a contour for a particular value as reference. Here is the
> levelplot command for the image:
>
> print(levelplot(d~x+y,data=t,cuts=20,scales=list(
fSeries rsiTA. Need help to modify function
Hello, in fSeries, the rsiTA function is this:
function (close, lag)
{
sumlag = function(x, lag) {
xs = x
for (i in 1:lag) {
x1 = c(x[1], x[1:(length(x) - 1)])
xs = xs + x1
x = x1
}
xs
}
Dear Mick,
The Anova() function in the car package will compute what are often called
"type-II" and "-III" sums of squares.
Without wishing to reinvigorate the sums-of-squares controversy, I'll just
add that the various "types" of sums of squares correspond to different
hypotheses. The hypothese
Michael Watson (IAH-C) wrote:
I guess the real problem is this:
As I have a different number of observations in each of the groups, the
results *change* depending on which order I specify the factors in the
model. This unnerves me. With a completely balanced design, this
doesn't happen - the resu
Dear all,
I am looking at habituation of dogs trotting on a treadmill.
Each record is made of 40 to 50 data for the same variable (for example
Peak).
I get each record at several minutes (1, 2 and 4) for each session. And
I have 4 sessions of training (one session a week).
The aim is to study th
I'm running SAM in R package, I am analysing two affy array's groups data (two
conditions in 3 separate pairs). I am using SAM starting from a filtered list
containing 3000 genes but I had some problems. Infact when I analyze the delta
table I have the number of the false positives that drasticall
"michael watson (IAH-C)" <[EMAIL PROTECTED]> writes:
> I guess the real problem is this:
>
> As I have a different number of observations in each of the groups, the
> results *change* depending on which order I specify the factors in the
> model. This unnerves me. With a completely balanced des
On Wed, 20 Apr 2005, michael watson (IAH-C) wrote:
I guess what I want to know is if I use the type I sequential SS, as
reported by R, on my factorial anova which is unbalanced, am I doing
something horribly wrong? I think the answer is no.
Sort of. You really should test a hypothesis at a time.
Dear everybody!
I am analysing data from an enquette. The answers are either A or B. How can I
draw a histogram without transforming the data from characters to numbers? If
the data are saved in a list M, hist(M[,1]) returns:
Error in hist.default(M[, 1]) : `x' must be numeric
Execution halted
Dear R group,
I have a data frame which contains data on preferences on 7 items (ranks 1
through 7) listed by each participant. I would like to tabulate this in a
7x7 table where the rows would be the items and the columns would be the
number of times that item received a particular rank.
On Wed, 20 Apr 2005, michael watson (IAH-C) wrote:
I guess the real problem is this:
As I have a different number of observations in each of the groups, the
results *change* depending on which order I specify the factors in the
model. This unnerves me. With a completely balanced design, this
does
Dear Prof. Tierney,
Thank for very much for replying and we all appreciate what you have
done for the R community. Currently I have been spoiled by R. I would
love to be 100% R.
I talked to Andy Liaw yesterday about how to make R faster. Maybe we
need to explicitly declare variables in the critic
On 20-Apr-05 michael watson \(IAH-C\) wrote:
> I guess the real problem is this:
>
> As I have a different number of observations in each of the
> groups, the results *change* depending on which order I
> specify the factors in the model. This unnerves me. With a
> completely balanced design, thi
On Wed, 20 Apr 2005 17:37:04 +0200 Mag. Ferri Leberl wrote:
> Dear everybody!
> I am analysing data from an enquette. The answers are either A or B.
> How can I draw a histogram without transforming the data from
> characters to numbers? If the data are saved in a list M, hist(M[,1])
> returns:
>
Hello list,
I just installed R 2.1.0. When I try to run the "Server 01 - Basic test"
I get the error "Fatal error: unable to open the base package".
Any solution?
Thank you,
Adrian Dragulescu
__
R-help@stat.math.ethz.ch mailing list
https://stat.eth
It is quite likely that we will move in a direction of supporting
annotations or declarations of some sort as well--at least that is one
of the things I am planning to investigate. I believe there is still
some room for improvement without this, but larger improvements will I
believe require some
"Mag. Ferri Leberl" <[EMAIL PROTECTED]> writes:
> Dear everybody!
> I am analysing data from an enquette. The answers are either A or B. How can
> I
> draw a histogram without transforming the data from characters to numbers? If
> the data are saved in a list M, hist(M[,1]) returns:
>
> Error
Dear R-gurus,
being very new to R, (as well as lazy and not too smart !) I have some
problems (and get lost in the docs) trying to write something to find
the 9 values (A1,B1,C1,A2,B2,C2C3) which are solutions of a 12
equations system of the form :
> x1-(A1/(A1+B1+C1)) = 0
> y1-(B1/(A1+B1+C
> From: Mag. Ferri Leberl
>
> Dear everybody!
> I am analysing data from an enquette. The answers are either
> A or B. How can I
> draw a histogram without transforming the data from
> characters to numbers? If
> the data are saved in a list M, hist(M[,1]) returns:
>
> Error in hist.default(M
On Wed, 20 Apr 2005 11:38:13 -0400 Ravi Varadhan wrote:
> Dear R group,
>
>
>
> I have a data frame which contains data on preferences on 7 items
> (ranks 1 through 7) listed by each participant. I would like to
> tabulate this in a 7x7 table where the rows would be the items and the
> column
Ravi --
If you use table on a factor, you'll get 0's if appropriate:
> table(sample(1:5, 10, replace = TRUE)) #no 2's, by chance
1 3 4 5
3 1 2 4
> table(sample(1:5, 20, replace = TRUE)) # no 6's here, so 6 doesn't show
up
1 2 3 4 5
3 5 2 5 5
## now make it a factor, and you get 0 3's an
Free Shipping and SPRING FEVER Sale at Xandria.com
Receive FREE SHIPPING on all orders placed using this link!
(http://www.xandria.com/promo-pages/spring2005.asp?aid=SEL_042005) 2-day air
orders will be a flat rate of $14 when using the FREE SHIPPING link.
Just in case you missed it, April
If you make them into factors, the empty ones should show up:
> f1 <- sample(1:7, 10, replace=TRUE)
> f2 <- sample(1:6, 10, replace=TRUE)
> table(f1, f2)
f2
f1 1 2 3 5 6
1 0 0 1 0 0
2 0 0 1 0 0
3 0 0 2 1 0
4 0 1 0 0 1
5 1 1 0 0 0
7 0 0 0 1 0
> ff1 <- factor(f1, levels=1:7)
> ff2 <-
Hi everybody,
I have trouble installing my own package under R 2.1.0 (it is fine under R
2.0.1). My OS is Windows NT.
I installed my package 'mag' by using menu "Packages/Install package from
local zip files". It's fine (html package description was updated). But
when I typed in library(mag)
Thanks very much to Achim Zeileis, Matt Weiner, and Andy Liaw for their
solution. Declaring preferences as a "factor" worked!
Best,
Ravi.
--
Ravi Varadhan, Ph.D.
Assistant Professor, The Center on Aging and Health
Division
Hello,
The editor of R will close after I enter the following commands. I do not know
the reason at all. When does this happen? I would very appreciate it if you
could let me know.
Sincerely.
=
gam <- matrix(scan("C:/Documents and Settings/Yoko N/Desktop/R/sas2.txt"), ncol
= 29)
Read 38413
Dear all,
Thanks for the responses to this post.
I understand that the topic still requires more research. However, I am a non-statistician in a
desperate need to analyze my ecological data with the currently available tools. Please excuse
again my non-expert question: Would I commit a huge mista
Hello,
I have been trying to figure this one out, but don't seem to go
anywhere. I have a function like this:
a = function(t) {
max(0,t+1)
}
very simple, but if I pass a vector of n values to this function I
expect n evaluations of max and instead I get only one value (the
largest value of them
As Achim said, I would use a barplot instead of an hist.
Here's how I would do it:
vect<-c("a","b","a","b","b","b","a","a","a")
a<-length(vect[vect=="a"])
b<-length(vect[vect=="b"])
barplot(c(a,b),names.arg=(c("A","B")))
Neuro the Super Hero
From: "Mag. Ferri Leberl" <[EMAIL PROTECTED]>
Reply-To: [
This is the wrong list for DCOM questions. Please check the archives: you
are not the first to use the wrong list (although it is rare).
Or just look at the html page where you got the server.
On Wed, 20 Apr 2005, Adrian Dragulescu wrote:
I just installed R 2.1.0. When I try to run the "Server
Have you considered multiplying the first set of equations by the
denominator to convert them to something like the following:
x1*(A1+B1+C1)-A1=0.
This will give you 12 equations in 9 unknowns. For this, "lm"
will give you the least squares solution. If the system has a singl
Permit me to echo Bjørn-Helge Mevik's thanks.
I've been telling people that R is rapidly becoming the platform
of choice for new statistical algorithm development for many reasons.
* First, it gives someone almost instant access to many of the
leading international experts in s
> From: Yoko Nakajima
>
> Hello,
>
> The editor of R will close after I enter the following
> commands. I do not know the reason at all. When does this
> happen? I would very appreciate it if you could let me know.
>
> Sincerely.
> =
> gam <- matrix(scan("C:/Documents and Settings/Yoko
>
Luke Tierney <[EMAIL PROTECTED]> writes:
> Vectorized operations in R are also as fast as compiled C (because
> that is what they are :-)). A compiler such as the one I'm working on
> will be able to make most difference for non-vectorizable or not very
> vectorizable code. It may also be able t
Perhaps by using apply?
What do you think that
max(0,c(1,2,3,4)+1)
should return?
On 4/20/05, Jorge Ahumada <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have been trying to figure this one out, but don't seem to go
> anywhere. I have a function like this:
>
> a = function(t) {
>
> max(0,t+1
> From: Jorge Ahumada
>
> Hello,
>
> I have been trying to figure this one out, but don't seem to go
> anywhere. I have a function like this:
>
> a = function(t) {
>
> max(0,t+1)
>
> }
>
> very simple, but if I pass a vector of n values to this function I
> expect n evaluations of max and i
Sure. Here are three ways. Using pmax() is probably the most elegant.
a <- function(t) {
pmax(t + 1, 0)
}
OR
a <- function(t) {
sapply(t + 1, max, 0)
}
OR
a <- function(t) {
t <- t + 1
t[which(t < 0)] <- 0
t
}
-Original Message-
From: Jorge Ahu
?pmax
David L. Reiner
-Original Message-
From: Jorge Ahumada [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 20, 2005 12:03 PM
To: r-help@stat.math.ethz.ch
Subject: [R] A question about function behavior
Hello,
I have been trying to figure this one out, but don't seem to go
anywhere.
As you requested, you have been unsubscribed from 'xandriaselect'.
---
Return-Path: <[EMAIL PROTECTED]>
Received: from wproxy.gmail.com ([64.233.184.201]) by lyris.xandria.com with
SMTP (Lyris ListManager WIN32 version 7.0b); Wed, 20 Apr 2005 11:45:52 -0800
Received: by wproxy.gmail.com with SMT
On Wed, 20 Apr 2005, Nestor Fernandez wrote:
Dear all,
Thanks for the responses to this post.
I understand that the topic still requires more research. However, I am a
non-statistician in a desperate need to analyze my ecological data with the
currently available tools. Please excuse again my non
I think you want this:
b<- function(t) {pmax(0,t+1)}
alex
- Original Message -
From: "Jorge Ahumada" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, April 20, 2005 6:02 PM
Subject: [R] A question about function behavior
> Hello,
>
> I have been trying to figure this one out, but don't seem
R-help,
After cogitating for a while, I finally figured out how to define a
data.frame column as factor and assign the levels within a function...
BUT I still need to pass the data.frame and its name separately. I can't
seem to find any other way to pass the name of the data.frame, rather
than th
Folks:
At the great risk of having my ignorance publicly displayed, let me say:
1) I enjoyed and learned from the discussion;
2) I especially enjoyed WNV's paper linked by BDR -- I enjoyed both the
wisdom of the content and the elegance and humor of style. Good writing is a
rare gift.
Anyway, I
Jorge Ahumada wrote on 4/20/2005 12:02 PM:
Hello,
I have been trying to figure this one out, but don't seem to go
anywhere. I have a function like this:
a = function(t) {
max(0,t+1)
}
very simple, but if I pass a vector of n values to this function I
expect n evaluations of max and instead I ge
Thank you very much for all the answers. pmax works great!
Jorge
On Apr 20, 2005, at 1:55 PM, Alexandre Brito wrote:
I think you want this:
b<- function(t) {pmax(0,t+1)}
alex
- Original Message -
From: "Jorge Ahumada" <[EMAIL PROTECTED]>
To:
Sent: Wednesday, April 20, 2005 6:02 PM
Subject:
Hello
Consider ?pmax instead of max
a <- function(t){
pmax(0,t+1)
}
a( c(1,2,-4,2))
Romain
Le 20.04.2005 19:02, Jorge Ahumada a écrit :
Hello,
I have been trying to figure this one out, but don't seem to go
anywhere. I have a function like this:
a = function(t) {
max(0,t+1)
}
very simple, but if
Wouldn't it be easier to do this?
> levels(y$one) <- seq(1, 9, by=2)
> y$one
[1] 1 1 3 3 5 7
attr(,"levels")
[1] 1 3 5 7 9
Andy
> From: Tim Howard
>
> R-help,
> After cogitating for a while, I finally figured out how to define a
> data.frame column as factor and assign the levels within a fun
Some thoughts:
* As it's free (no guarantee) and 'matrix oriented' (all the details can be
accessed), R user has (sic) better control of what he's doing. In my
opinion, R is a better learning tool than others
* No doubt that the intangible asset of R is the R users and their
commitment to share hel
[EMAIL PROTECTED] wrote:
Hi everybody,
I have trouble installing my own package under R 2.1.0 (it is fine under R
2.0.1). My OS is Windows NT.
I installed my package 'mag' by using menu "Packages/Install package from
local zip files". It's fine (html package description was updated). But
when I
Even though R is free, that doesn't mean its not possible to support
it financially. There is a provision for useRs to "join" the
foundation for a very small annual fee. I stumbled on this a few
months ago and immediately joined because I think I benefit
tremendously from using R. Check out the
Hi all --
I have a matrix of doubles (roughly 30x80) which I'd like to copy to
the clipboard. However, as the following shows:
> dm = matrix(runif(30 * 80), nrow = 80)
> write.table(dm, "clipboard", sep = "\t")
Warning message:
clipboard buffer is full and output lost
Is there any way to i
Hi Chris,
>From ?file:
Clipboard:
...
When writing to the clipboard, the output is copied to the
clipboard only when the connection is closed or flushed. There is
a 32Kb limit on the text to be written to the clipboard. This can
be raised by using e.g. 'file("clipboard-128")' o
Of course Andy meant hist.factor(f)
In particular you should note that Andy uses the table function to "transform
... the data from characters to numbers"
Tom
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Liaw, Andy
> Sent: Thursday, 21 April 2005
Well you have not given us anything to go on really. Are there more than 94
columns? Does each column have a valid fieldname? RODBC is not guaranteed to
work in every possible scenario. If you have a look through the list you will
find there are specific limitations which are not immediately app
Mea Culpa
I did copy and paste your code to make sure it was an error. I'll go and do it
again before I reply.
It worked as you expected it to. So I located where I had done it and this is
what I found
> f <- factor(sample(c("A", "B"), 50, replace=TRUE))
> hist(f)
Error in hist.default(f) : 'x
Hello,
probably this isn't hard, but I can't get R to do this. Thanks for your
help!
Assume I have a matrix of two covariates:
n<- 1000
Y<- runif(n)
X<- runif(n,min=0,max=100)
data <- cbind(Y,X)
Now, I would like to compute the local average of Y for each X interval 0-1,
1-2, 2-3, .
a<-sapply(1:100,function(x)mean(Y[Xx-1]))
b<-sapply(1:100,function(x)median(Y[Xx-1]))
From: "Jens Hainmueller" <[EMAIL PROTECTED]>
To: "R-Help"
Subject: [R] local average Date: Wed, 20 Apr 2005 23:43:41 -0400
Hello,
probably this isn't hard, but I can't get R to do this. Thanks for your
help!
Ass
1 - 100 of 105 matches
Mail list logo