I don't run into any problem when runing examples from lda help file.
> sessionInfo()
R version 2.10.0 Patched (2009-11-09 r50375)
i386-pc-mingw32
locale:
[1] LC_COLLATE=Chinese_People's Republic of China.936
[2] LC_CTYPE=Chinese_People's Republic of China.936
[3] LC_MONETARY=Chinese_People's Rep
In addition to using the survey package (and the svyby function), I've found
that many of the 'weighted' functions, such as wtd.mean, work well with the
plyr package. For example,
wtdmean=function(df)wtd.mean(df$obese,df$sampwt);
ddply(mydata, ~cut2(age,c(2,6,12,16)),'wtdmean')
hth, david free
In addition to using the survey package (and the svyby function), I've found
that many of the 'weighted' functions, such as wtd.mean, work well with the
plyr package. For example,
wtdmean=function(df)wtd.mean(df$obese,df$sampwt);
ddply(mydata, ~cut2(age,c(2,6,12,16)),'wtdmean')
hth, david free
Hi,
It was pointed out to me by Hans Borchers that the timing that I reported (0.3
sec) in the previous email for solving the LSAP problem, for N=1000, was too
optimistic, because "X" and "Y" were equivalent up to a permutation.
In order to test this out, I ran a few more experiments with dif
Have you reviewed the survey package functions?
--
David
On Nov 14, 2009, at 5:31 PM, Andrew Miles wrote:
I've noticed that R has a number of very useful functions for
obtaining descriptive statistics on groups of variables, including
summary {stats}, describe {Hmisc}, and describe {psych}, but
u were really asking for.
The dates are in the format 20091114 so i'm just going to treat them
as
numbers for clean up purposes.
I know that i use subset but not sure how to proceed from there.
subdata <- subset(data, date_abandoned > "0101"()
The problem with >
Hello all,
I'm trying to run lda() from the MASS library but the Help example generates
the
following error:
#Code from example in lda Help file
# Resulting Error
>Error in if (targetlist[i] == stringname) { : argument is of length zero
My Current R Installation:
MacOSX: 10.5.8
R: 2.10.0
>
> Also, you probably get less data copying by using a for() or while() loop
> than by using apply() in this context.
Why may there be less data copying with "for" and "while" compared to apply?
>
> Finally, the overhead of formula parsing and model matrix construction
> repeated thousands of
reater than 1,010,000.
>
> Are you doing archeology? Given what you say next I wondered what
> range you were really asking for.
>
>>
>> The dates are in the format 20091114 so i'm just going to treat them
>> as
>> numbers for clean up purposes.
>>
&
I've noticed that R has a number of very useful functions for
obtaining descriptive statistics on groups of variables, including
summary {stats}, describe {Hmisc}, and describe {psych}, but none that
I have found is able to provided weighted descriptives of subsets of a
data set (ex. descri
Charlie,
Thank you very much for your reply. I also read this earlier and noticed this
package was contributed in 2002 and not updated since then, so I am afraid it
has long since been surpassed by both the R and Octave architectures and not
been maintained.
Thus, I guess my search will co
See
http://www.omegahat.org/ROctave/
which offers the source package for download and some documentation that
is not too promising.
Good luck,
Uwe Ligges
Jason Rupert wrote:
Uwe,
Thank you for the quick response, but I think I'm missing what is being suggested about the Omegahat site.
Uwe,
Thank you for the quick response, but I think I'm missing what is being
suggested about the Omegahat site.
I think I may be overlooking something about that site.
I tried:
> install.packages(ROctave, repos = "http://www.omegahat.org/R";)
Error in install.packages(ROctave, repos = "http:
There is also this lexicon which might be sufficient to allow you to
rewrite the Octave routine in R:
http://cran.r-project.org/doc/contrib/R-and-octave.txt
On Sat, Nov 14, 2009 at 5:29 PM, cls59 wrote:
>
>
> Jason Rupert wrote:
>>
>> I see at one time there was a package called ROctave. I tried
Jason Rupert wrote:
>
> I see at one time there was a package called ROctave. I tried to install
> that package:
>
>> install.packages("ROctave")
> --- Please select a CRAN mirror for use in this session ---
> Warning message:
> In getDependencies(pkgs, dependencies, available, lib) :
> pack
- It has never been on CRAN.
- A quick Google search suggests it is on Omegahat.
Uwe Ligges
Jason Rupert wrote:
I see at one time there was a package called ROctave. I tried to install that
package:
install.packages("ROctave")
--- Please select a CRAN mirror for use in this session ---
Mauricio O Calvao wrote:
Unfortunately you eschewed answering objectively any of my questions; I insist
they do make sense. Don't mention the data are perfect; this does not help to
make any progress in understanding the choice of convenient summary info the lm
method provides, as compared to wh
On Nov 14, 2009, at 1:50 PM, Mauricio O Calvao wrote:
David Winsemius comcast.net> writes:
Which means those x, y, and "error" figures did not come from an
experiment, but rather from theory???
The fact is I am trying to compare the results of:
(1) lm under R and
(2) the Java applet at
Please forgive a stats question
I am trying to model colonization with a bacterium with the aims of quantifying
overall colonization rate as well as determining risk factors for colonization
in a in-hospital setting. Risk factors to me measured include type of contact
with a patient (e.g. feedi
you doing archeology? Given what you say next I wondered what
range you were really asking for.
The dates are in the format 20091114 so i'm just going to treat them
as
numbers for clean up purposes.
I know that i use subset but not sure how to proceed from there.
subdata <-
I want to go through a column in data called
date_abandoneddata["date_abandoned"]and remove all the rows that
have numbers greater than 1,010,000.
The dates are in the format 20091114 so i'm just going to treat them as
numbers for clean up purposes.
I know that i use
David Winsemius comcast.net> writes:
>
> Which means those x, y, and "error" figures did not come from an
> experiment, but rather from theory???
>
The fact is I am trying to compare the results of:
(1) lm under R and
(2) the Java applet at http://omnis.if.ufrj.br/~carlos/applets/reta/reta
Yes, I also wish Sweave could give us more flexible options, e.g. it
should not be difficult to free the graphics device specification as
an R function (pdf, png, CairoPDF, ...) instead of just letting us set
pdf=T/F and eps=T/F.
If we don't want to hack the Sweave code, we may also rewrite it as
w_poet wrote:
Hi everyone,
I'm doing a logistic regression with an ordinal variable. I'd like to set
the contrasts on the ordinal variable. However, when I set the contrasts,
they work for ordinary linear regression (lm), but not logistic regression
(lrm):
ddist = datadist(bin.time, exp.loc)
op
I'm having trouble figuring out how to format Date variables when used
as axis labels in graphs.
The particular case here is an attempt to re-create Nightingale's
coxcomb graph with ggplot2,
where I'd like the months to be labeled as "Mar 1885", "Apr 1885", using
a date format
of "%b %Y" applied
I see at one time there was a package called ROctave. I tried to install that
package:
> install.packages("ROctave")
--- Please select a CRAN mirror for use in this session ---
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘ROctave’ is not available
Unfortu
You may have to run R as Administrator (right-click, choose run as
administrator) to make these kinds of changes. After you have things the way
you like them, run R in the usual way by clicking on the icon.
Charles Annis, P.E.
charles.an...@statisticalengineering.com
561-352-9699
http://www.St
Thanks, Yihui
Your solution, for png(), only looks dirty because you had to hack the
Sweave code.
It would be nice to have png() support included directly.
Yihui Xie wrote:
I was reminded that the attachments were blocked by the list, so I
send these links again:
http://yihui.name/en/wp-conte
Hi Peng,
I'm wondering which eclipse I shall download to use with StatET. Would
you please let me know?
http://www.eclipse.org/downloads/
This depends on your needs other than R programming.
As you can see, there are Eclipse Packages targeted
at C/C++ developers, PHP developers, Java EE devel
There appear to be win32 binaries for the the current release of rpy2.
L.
On Nov 4, 4:21 pm, Gabor Grothendieck wrote:
> As far as I know the latest versions of neither RSpython norrpy2
> support Windows. For accessing SymPy (which is a python computer
> algebra system) from R rSymPy went wi
The full code and error message i get is...
> cleanse <- function(a){
+ data1<-a
+ for (i in 1:dim(data1)[1])
+ {
+ if (data1[i,"legal_status"] == "Private"){
+ data1[i,"legal_status"]<-data1[-i,]
+ if (data1[i,"legal_status"] == "Private (Op"){
+ data1[i,"legal_status"]<
The solution is much simpler (thanks Phil!)
new_data = data[!data$"legal status" %in% c("Private","Private
(Op","Unknown"),]
...works nicely.
frenchcr wrote:
>
> hello folks,
>
> Im trying to clean out a large file with data i dont need.
> The column im manipulating in the file i
Yihui Xie a écrit :
please read the 'Details' section of ?require
To suppress messages during the loading of packages use
'suppressPackageStartupMessages': this will suppress all messages
from R itself but not necessarily all those from package authors.
Regards,
Yihui
Thank you
Hi,
I have solved the problem that I had posed before. Here is a statement of the
problem:
"I have a complex-valued vector X in C^n. Given another complex-valued vector
Y in C^n, I want to find a permutation of Y, say, Y*, that minimizes ||X -
Y*||, the distance between X and Y*. "
I was t
I'm wondering which eclipse I shall download to use with StatET. Would
you please let me know?
http://www.eclipse.org/downloads/
On Sat, Nov 14, 2009 at 5:46 AM, Tobias Verbeke
wrote:
> Hi Peng,
>
> Some of the refactoring methods I identified back
> then were integrated into Eclipse/StatET in t
On Nov 13, 2009, at 11:49 AM, Sam Albers wrote:
Hello R list,
snipped answered question
Sorry to not use your data but it's not in a form that lends itself
very well to quick testing. If you had included the input commands I
might have tried it.
No problem not use my data. For futur
If i want to fit my data using gpd(data) in a extreme theory packages ,
how can i fit the lower tail of my data ?? the gpd function seems just has
upper threshold , so ,if i want to fit the lower tail of my data , i
have to use gpd(-data) . can i fit the lower tail just use gpd(data)
Hi Peng,
Some of the refactoring methods I identified back
then were integrated into Eclipse/StatET in the
mean time.
StatET by the way contains some extensions that were
not in the original proposal on that website.
For the announcement of the latest release, see
http://lists.r-forge.r-projec
Hi,
You can also read the hdf5 files with the rgdal package. This loads them
into sp-objects, see the sp-package for more info. In the archives of
the r-sig-geo mailing list there have been some other people (including
myself :)) that have asked this question:
https://stat.ethz.ch/pipermail/
On Fri, Nov 13, 2009 at 6:24 PM, Don MacQueen wrote:
> In R for Macintosh, there is a Preferences setting that will do this.
> You can also drag and drop a file onto the R icon and I believe it will
> change the working directory to the directory that contains the file.
>
> On unix-like systems, u
anna_l wrote:
Hello, I am using setwd() to change the working directory but I have to enter
it everytime I open R, is there a way to set this permanently as a working
directory? Thanx =^D
Hi Anna,
I create a .First function that is run when the session starts that looks like
this:
.First<
On 14.11.2009, at 03:58, David Winsemius wrote:
On Nov 13, 2009, at 11:19 AM, soeren.vo...@eawag.ch wrote:
a <- c("Mama", "Papa", "Papa; Mama", "", "Sammy; Mama; Papa")
a <- strsplit(a, "; ")
mama <- rep(F, length(a))
mama[sapply(a, function(x) { sum(x=="Mama") }, simplify=T) > 0] <- T
[...]
Hi everyone,
I'm doing a logistic regression with an ordinal variable. I'd like to set
the contrasts on the ordinal variable. However, when I set the contrasts,
they work for ordinary linear regression (lm), but not logistic regression
(lrm):
ddist = datadist(bin.time, exp.loc)
options(datadist=
That did it, boy do I feel silly.
Thanks!
On Fri, Nov 13, 2009 at 10:16 PM, Berwin A Turlach
wrote:
> G'day Scott,
>
> On Fri, 13 Nov 2009 09:52:43 -0700
> Scott MacDonald wrote:
>
> > I am trying to load an hdf5 file into R and running into some
> > problems.
>
> It's a while that I used hdf5
44 matches
Mail list logo