[R] kknn and logistic regression: how to cross-validate binary prediction

2010-03-15 Thread noclue_

I am comparing kknn and logistic regression for binary outcome prediction -

For kknn, I can do -

kknn_<-kknn(out_come ~ age + gender , learn_, valid_)
fit<-fitted(kknn_)
table(valid_$out_come, fit)

to get validation results in cross-tabulation.

-

For logistic, how can I do the equivalent cross-validation?

logit_<-glm(out_come ~ age + gender, data=learn_, family=binomial)
...
... 
then how could I fit the logistic regression on validation data (ie. valid_)
to get predicted outcome?

Thanks!
-- 
View this message in context: 
http://n4.nabble.com/kknn-and-logistic-regression-how-to-cross-validate-binary-prediction-tp1594107p1594107.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


[R] binary response: from p_hat to 0, 1

2010-03-15 Thread noclue_

I am using PROC LOGISTIC to model binary outcomes.

I have observed Y (1 or 0) from original data.

I also have got predicted probability for each observation (i.e. predicted 
probability of event Y=1) from PROC LOGISTIC. Let us call it - p_hat.


for example, I would have two columns -

Y  p_hat
1  0.6
0  0.3
1  0.45
...



I would like to build a 2X2 classification table -  

Y =1, Y =0 vs. Y_hat=1, Y_hat =0 

to evaluate my classification accuracy.

The challenge is - how to derive Y_hat from p_hat?  what threshold shall I 
use to say --

if p_hat > .. then Y_hat = 1
else   Y_hat = 0

---

Besides, do I have to come up with thresholds/cutting points also for KNN,
Neural Net, 
RandomForest and rpart prediction?

 

Thanks.

 
 
 

-- 
View this message in context: 
http://n4.nabble.com/binary-response-from-p-hat-to-0-1-tp1594105p1594105.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


[R] estimate inverse gaussian in R

2009-12-06 Thread noclue_

I have a one-variable data set in R.

The plot of histogram of my numerical variable suggests an inverse 
gaussian distribution.

How can I obtain best estimation for the two parameters of inverse 
gaussian based on my data?

Thanks.
-- 
View this message in context: 
http://n4.nabble.com/estimate-inverse-gaussian-in-R-tp949692p949692.html
Sent from the R help mailing list archive at Nabble.com.

[[alternative HTML version deleted]]

__
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 code.


[R] How to dynamically display title for a graph

2010-01-04 Thread noclue_

I have written  a function (see below) which encloses a boxplot.  My function
"xbox" takes in a variable name (such as "age"), and do a boxplot. Now I
would like to add a title for the graph dynamically displaying the variable
name as part of title. 

But, in reality, the title displays VALUES of my variable.

Obviously, sprintf does not work. 

Can somebody shed light on how to solve my problem in properly displaying a
title ?

Thanks.

-

 xbox<- function(X)
 {
  boxplot(_expenses ~ X, data=my_tab,main=sprintf("title is %s",X))
 }
 
 xbox(age)

-- 
View this message in context: 
http://n4.nabble.com/How-to-dynamically-display-title-for-a-graph-tp998365p998365.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


[R] How to generate PDF help file for our internal R package?

2010-07-16 Thread noclue_

Currently, we have developed an R package for our company's internal use (at
least for now).  I have successfully built the package and generated zip
file which can be easily installed.  However, I am not sure how to generate
the big HELP file in PDF.  
 
Right now, I have about 30+ Rd files for this internal package. I can run 'R
CMD Rd2dvi' and WinEdt to create one pdf file individually for each Rd file.
But I have not been successful in getting one big pdf file.   Does anybody
know how to generate a complete pdf file for the package ?

Thanks!
-- 
View this message in context: 
http://r.789695.n4.nabble.com/How-to-generate-PDF-help-file-for-our-internal-R-package-tp2292167p2292167.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


[R] Linux 64-bit R installation problem - "Failed dependencies"

2010-10-07 Thread noclue_

I am trying to install 64 bit R on Linux.  But I got the following error -  


rpm -i R-core-2.10.0-2.fc11.x86_64.rpm

warning: R-core-2.10.0-2.fc11.x86_64.rpm: Header V3 DSA signature: NOKEY,
key ID 97d3544e
error: Failed dependencies:
/bin/bash is needed by R-core-2.10.0-2.fc11.x86_64
/bin/sh is needed by R-core-2.10.0-2.fc11.x86_64
/sbin/ldconfig is needed by R-core-2.10.0-2.fc11.x86_64
/usr/bin/perl is needed by R-core-2.10.0-2.fc11.x86_64
cups is needed by R-core-2.10.0-2.fc11.x86_64
gawk is needed by R-core-2.10.0-2.fc11.x86_64
ld-linux-x86-64.so.2()(64bit) is needed by
R-core-2.10.0-2.fc11.x86_64
ld-linux-x86-64.so.2(GLIBC_2.2.5)(64bit) is needed by
R-core-2.10.0-2.fc11.x86_64
less is needed by R-core-2.10.0-2.fc11.x86_64
libICE.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libSM.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libX11.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libXmu.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libXt.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libbz2.so.1()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libc.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libc.so.6(GLIBC_2.2.5)(64bit) is needed by
R-core-2.10.0-2.fc11.x86_64
libc.so.6(GLIBC_2.3)(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libc.so.6(GLIBC_2.3.4)(64bit) is needed by
R-core-2.10.0-2.fc11.x86_64
libc.so.6(GLIBC_2.4)(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libc.so.6(GLIBC_2.7)(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libc.so.6(GLIBC_2.8)(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libcairo.so.2()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libdl.so.2()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libdl.so.2(GLIBC_2.2.5)(64bit) is needed by
R-core-2.10.0-2.fc11.x86_64
libgcc_s.so.1()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libgfortran.so.3()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libgfortran.so.3(GFORTRAN_1.0)(64bit) is needed by
R-core-2.10.0-2.fc11.x86_64
libglib-2.0.so.0()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libgmodule-2.0.so.0()(64bit) is needed by
R-core-2.10.0-2.fc11.x86_64
libgobject-2.0.so.0()(64bit) is needed by
R-core-2.10.0-2.fc11.x86_64
libicui18n.so.40()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libicuuc.so.40()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libjpeg.so.62()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libm.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libm.so.6(GLIBC_2.2.5)(64bit) is needed by
R-core-2.10.0-2.fc11.x86_64
libpango-1.0.so.0()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libpangocairo-1.0.so.0()(64bit) is needed by
R-core-2.10.0-2.fc11.x86_64
libpcre.so.0()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libpng12.so.0()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libpng12.so.0(PNG12_0)(64bit) is needed by
R-core-2.10.0-2.fc11.x86_64
libreadline.so.5()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libstdc++.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libtcl8.5.so()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libtiff.so.3()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libtk8.5.so()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
libz.so.1()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64
perl is needed by R-core-2.10.0-2.fc11.x86_64
perl(Carp) is needed by R-core-2.10.0-2.fc11.x86_64
perl(Cwd) is needed by R-core-2.10.0-2.fc11.x86_64
perl(Exporter) is needed by R-core-2.10.0-2.fc11.x86_64
perl(File::Basename) is needed by R-core-2.10.0-2.fc11.x86_64
perl(File::Compare) is needed by R-core-2.10.0-2.fc11.x86_64
perl(File::Copy) is needed by R-core-2.10.0-2.fc11.x86_64
perl(File::Copy::Recursive) is needed by R-core-2.10.0-2.fc11.x86_64
perl(File::Find) is needed by R-core-2.10.0-2.fc11.x86_64
perl(File::Path) is needed by R-core-2.10.0-2.fc11.x86_64
perl(File::Spec) is needed by R-core-2.10.0-2.fc11.x86_64
perl(FileHandle) is needed by R-core-2.10.0-2.fc11.x86_64
perl(Getopt::Long) is needed by R-core-2.10.0-2.fc11.x86_64
perl(IO::File) is needed by R-core-2.10.0-2.fc11.x86_64
perl(Text::Tabs) is needed by R-core-2.10.0-2.fc11.x86_64
perl(Text::Wrap) is needed by R-core-2.10.0-2.fc11.x86_64
perl(strict) is needed by R-core-2.10.0-2.fc11.x86_64
perl(vars) is needed by R-core-2.10.0-2.fc11.x86_64
perl(warnings) is needed by R-core-2.10.0-2.fc11.x86_64
rpmlib(FileDigests) <= 4.6.0-1 is needed by
R-core-2.10.0-2.fc11.x86_64
rtld(GNU_HASH) is needed by R-core-2.10.0-2.fc11.x86_6

[R] R: rulefit error on Linux

2010-10-07 Thread noclue_

R version 2.8.1 (2008-12-22) on Linux 64-bit

I am trying to run 'rulefit' function (Rule based Learning Ensembles). but I
got the following error -

> rulefit(x,y)
Warning: This program is an suid-root program or is being run by the root
user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s
xterm:  DISPLAY is not set
Error in file(file, "r") : cannot open the connection
In addition: Warning message:
In file(file, "r") :
  cannot open file '/root/_rulefit/rfstatus': No such file or directory
--

On windows R 2.10, I got this run successfully. So I am wondering whether it
is due to my R older version on Linux.

Thanks!
-- 
View this message in context: 
http://r.789695.n4.nabble.com/R-rulefit-error-on-Linux-tp2966391p2966391.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


Re: [R] Linux 64-bit R installation problem - "Failed dependencies"

2010-10-08 Thread noclue_

Hi. Marc,

Thanks so much for your reply.
Have a nice weekend!

Tim

-- Original Message --
From: "Marc Schwartz-3 [via R]" 
To: noclue_ 
Subject: Re: Linux 64-bit R installation problem - "Failed dependencies"
Date: Thu, 7 Oct 2010 05:31:26 -0700 (PDT)

 On Oct 7, 2010, at 3:50 AM, noclue_ wrote: 

>  
> I am trying to install 64 bit R on Linux.  But I got the following error -   
>  
>  
> rpm -i R-core-2.10.0-2.fc11.x86_64.rpm 
>  
> warning: R-core-2.10.0-2.fc11.x86_64.rpm: Header V3 DSA signature: NOKEY, 
> key ID 97d3544e 
> error: Failed dependencies: 
>/bin/bash is needed by R-core-2.10.0-2.fc11.x86_64 
>/bin/sh is needed by R-core-2.10.0-2.fc11.x86_64 
>/sbin/ldconfig is needed by R-core-2.10.0-2.fc11.x86_64 
>/usr/bin/perl is needed by R-core-2.10.0-2.fc11.x86_64 
>cups is needed by R-core-2.10.0-2.fc11.x86_64 
>gawk is needed by R-core-2.10.0-2.fc11.x86_64 
>ld-linux-x86-64.so.2()(64bit) is needed by 
> R-core-2.10.0-2.fc11.x86_64 
>ld-linux-x86-64.so.2(GLIBC_2.2.5)(64bit) is needed by 
> R-core-2.10.0-2.fc11.x86_64 
>less is needed by R-core-2.10.0-2.fc11.x86_64 
>libICE.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libSM.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libX11.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libXmu.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libXt.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libbz2.so.1()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libc.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libc.so.6(GLIBC_2.2.5)(64bit) is needed by 
> R-core-2.10.0-2.fc11.x86_64 
>libc.so.6(GLIBC_2.3)(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libc.so.6(GLIBC_2.3.4)(64bit) is needed by 
> R-core-2.10.0-2.fc11.x86_64 
>libc.so.6(GLIBC_2.4)(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libc.so.6(GLIBC_2.7)(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libc.so.6(GLIBC_2.8)(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libcairo.so.2()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libdl.so.2()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libdl.so.2(GLIBC_2.2.5)(64bit) is needed by 
> R-core-2.10.0-2.fc11.x86_64 
>libgcc_s.so.1()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libgfortran.so.3()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libgfortran.so.3(GFORTRAN_1.0)(64bit) is needed by 
> R-core-2.10.0-2.fc11.x86_64 
>libglib-2.0.so.0()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libgmodule-2.0.so.0()(64bit) is needed by 
> R-core-2.10.0-2.fc11.x86_64 
>libgobject-2.0.so.0()(64bit) is needed by 
> R-core-2.10.0-2.fc11.x86_64 
>libicui18n.so.40()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libicuuc.so.40()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libjpeg.so.62()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libm.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libm.so.6(GLIBC_2.2.5)(64bit) is needed by 
> R-core-2.10.0-2.fc11.x86_64 
>libpango-1.0.so.0()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libpangocairo-1.0.so.0()(64bit) is needed by 
> R-core-2.10.0-2.fc11.x86_64 
>libpcre.so.0()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libpng12.so.0()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libpng12.so.0(PNG12_0)(64bit) is needed by 
> R-core-2.10.0-2.fc11.x86_64 
>libreadline.so.5()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libstdc++.so.6()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libtcl8.5.so()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libtiff.so.3()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libtk8.5.so()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>libz.so.1()(64bit) is needed by R-core-2.10.0-2.fc11.x86_64 
>perl is needed by R-core-2.10.0-2.fc11.x86_64 
>perl(Carp) is needed by R-core-2.10.0-2.fc11.x86_64 
>perl(Cwd) is needed by R-core-2.10.0-2.fc11.x86_64 
>perl(Exporter) is needed by R-core-2.10.0-2.fc11.x86_64 
>perl(File::Basename) is needed by R-core-2.10.0-2.fc11.x86_64 
>perl(File::Compare) is needed by R-core-2.10.0-2.fc11.x86_64 
>perl(File::Copy) is needed by R-core-2.10.0-2.fc11.x86_64 
>perl(File::Copy::Recursive) is needed by R-core-2.10.0-2.fc11.x86_64 
>perl(File::Find) is needed by R-core-2.10.0-2.fc11.x86_64 
>perl(File::Path) is needed by R-core

[R] yum install - not working for installing R on Linux

2010-10-17 Thread noclue_


I am trying to install R on Linux (Redhat 4).  But 'yum' does not seem to
work...
thanks for your help/hints/suggestions in advance!


$ sudo cat /proc/version
Linux version 2.6.34.6-54.24.amzn1.i686 (mockbu...@build-31003.build) (gcc
version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Fri Sep 17 23:13:59 UTC
2010

$ sudo yum install
http://cran.cnr.berkeley.edu/bin/linux/redhat/el4/i386/R-core-2.10.0-2.el4.i386.rpm

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Setting up Install Process
R-core-2.10.0-2.el4.i386.rpm

|  23 MB 00:54
Examining /var/tmp/yum-root-3gwXzS/R-core-2.10.0-2.el4.i386.rpm:
R-core-2.10.0-2.el4.i386
Marking /var/tmp/yum-root-3gwXzS/R-core-2.10.0-2.el4.i386.rpm to be
installed
Resolving Dependencies
--> Running transaction check
---> Package R-core.i386 0:2.10.0-2.el4 set to be updated
--> Processing Dependency: firefox for package: R-core-2.10.0-2.el4.i386
--> Processing Dependency: ggv for package: R-core-2.10.0-2.el4.i386
--> Processing Dependency: libg2c.so.0 for package: R-core-2.10.0-2.el4.i386
--> Processing Dependency: libreadline.so.4 for package:
R-core-2.10.0-2.el4.i386
--> Processing Dependency: libtcl8.4.so for package:
R-core-2.10.0-2.el4.i386
--> Processing Dependency: libtk8.4.so for package: R-core-2.10.0-2.el4.i386
--> Processing Dependency: perl(File::Copy::Recursive) for package:
R-core-2.10.0-2.el4.i386
--> Processing Dependency: tetex-latex for package: R-core-2.10.0-2.el4.i386
--> Running transaction check
---> Package R-core.i386 0:2.10.0-2.el4 set to be updated
--> Processing Dependency: firefox for package: R-core-2.10.0-2.el4.i386
--> Processing Dependency: ggv for package: R-core-2.10.0-2.el4.i386
--> Processing Dependency: libg2c.so.0 for package: R-core-2.10.0-2.el4.i386
--> Processing Dependency: libreadline.so.4 for package:
R-core-2.10.0-2.el4.i386
--> Processing Dependency: libtcl8.4.so for package:
R-core-2.10.0-2.el4.i386
--> Processing Dependency: libtk8.4.so for package: R-core-2.10.0-2.el4.i386
---> Package perl-File-Copy-Recursive.noarch 0:0.38-4.4.amzn1 set to be
updated
---> Package tetex-latex.i386 0:3.0-33.8.6.amzn1 set to be updated
--> Processing Dependency: tetex-dvips = 3.0 for package:
tetex-latex-3.0-33.8.6.amzn1.i386
--> Processing Dependency: tetex = 3.0 for package:
tetex-latex-3.0-33.8.6.amzn1.i386
--> Processing Dependency: netpbm-progs for package:
tetex-latex-3.0-33.8.6.amzn1.i386
--> Running transaction check
---> Package R-core.i386 0:2.10.0-2.el4 set to be updated
--> Processing Dependency: firefox for package: R-core-2.10.0-2.el4.i386
--> Processing Dependency: ggv for package: R-core-2.10.0-2.el4.i386
--> Processing Dependency: libg2c.so.0 for package: R-core-2.10.0-2.el4.i386
--> Processing Dependency: libreadline.so.4 for package:
R-core-2.10.0-2.el4.i386
--> Processing Dependency: libtcl8.4.so for package:
R-core-2.10.0-2.el4.i386
--> Processing Dependency: libtk8.4.so for package: R-core-2.10.0-2.el4.i386
---> Package netpbm-progs.i386 0:10.35.58-8.4.amzn1 set to be updated
--> Processing Dependency: netpbm = 10.35.58-8.4.amzn1 for package:
netpbm-progs-10.35.58-8.4.amzn1.i386
--> Processing Dependency: ghostscript for package:
netpbm-progs-10.35.58-8.4.amzn1.i386
--> Processing Dependency: libnetpbm.so.10 for package:
netpbm-progs-10.35.58-8.4.amzn1.i386
---> Package tetex.i386 0:3.0-33.8.6.amzn1 set to be updated
--> Processing Dependency: tetex-fonts = 3.0 for package:
tetex-3.0-33.8.6.amzn1.i386
--> Processing Dependency: dialog for package: tetex-3.0-33.8.6.amzn1.i386
---> Package tetex-dvips.i386 0:3.0-33.8.6.amzn1 set to be updated
--> Processing Dependency: psutils for package:
tetex-dvips-3.0-33.8.6.amzn1.i386
--> Running transaction check
---> Package R-core.i386 0:2.10.0-2.el4 set to be updated
--> Processing Dependency: firefox for package: R-core-2.10.0-2.el4.i386
--> Processing Dependency: ggv for package: R-core-2.10.0-2.el4.i386
--> Processing Dependency: libg2c.so.0 for package: R-core-2.10.0-2.el4.i386
--> Processing Dependency: libreadline.so.4 for package:
R-core-2.10.0-2.el4.i386
--> Processing Dependency: libtcl8.4.so for package:
R-core-2.10.0-2.el4.i386
--> Processing Dependency: libtk8.4.so for package: R-core-2.10.0-2.el4.i386
---> Package dialog.i386 0:1.1-9.20080819.1.2.amzn1 set to be updated
---> Package ghostscript.i386 0:8.15.2-9.11.11.amzn1 set to be updated
--> Processing Dependency: ghostscript-fonts for package:
ghostscript-8.15.2-9.11.11.amzn1.i386
---> Package netpbm.i386 0:10.35.58-8.4.amzn1 set to be updated
---> Package psutils.i386 0:1.17-34.2.amzn1 set to be updated
---> Package tetex-fonts.i386 0:3.0-33.8.6.amzn1 set to be updated
--> Running transaction check
---> Package R-core.i386 0:2.10.0-2.el4 set to be updated
--> Processing Dependency: firefox for package: R-core-2.10.0-2.el4.i386
--> Processing Dependen

[R] How to install R on Linux via source compilation?

2010-10-17 Thread noclue_



How to install R on Linux via source compilation?
Has anybody done it?
I could not find step by step instructions online.

I would appreciate if you could share your experience.

Thanks.
-- 
View this message in context: 
http://r.789695.n4.nabble.com/How-to-install-R-on-Linux-via-source-compilation-tp2999218p2999218.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


Re: [R] yum install - not working for installing R on Linux

2010-10-17 Thread noclue_

Thanks. Marc!
I tried using 'sudo yum install R' - but got the following error --

$ sudo yum install R
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Setting up Install Process
No package R available.
Error: Nothing to do
-

will look into epel...


-- 
View this message in context: 
http://r.789695.n4.nabble.com/yum-install-not-working-for-installing-R-on-Linux-tp2998891p2999219.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


[R] R installation failed on SUSE Linux -- libreadline.so.6 needed

2010-10-18 Thread noclue_

I think that I have successfully installed libreadline.so.6.
But still got an error -- libreadline.so.6 needed   during R installation on
SUSE Linux.

help is really appreciated!
===

# ls -lt /usr/local/lib
total 4088
-rw-r--r-- 1 root root  168858 Oct 18 07:15 libhistory.a
lrwxrwxrwx 1 root root  15 Oct 18 07:15 libhistory.so -> libhistory.so.6
lrwxrwxrwx 1 root root  17 Oct 18 07:15 libhistory.so.6 ->
libhistory.so.6.0

-r-xr-xr-x 1 root root  110410 Oct 18 07:15 libhistory.so.6.0
-rw-r--r-- 1 root root 1149336 Oct 18 07:15 libreadline.a
lrwxrwxrwx 1 root root  16 Oct 18 07:15 libreadline.so ->
libreadline.so.6
lrwxrwxrwx 1 root root  18 Oct 18 07:15 libreadline.so.6 ->
libreadline.so.6
.0
-r-xr-xr-x 1 root root  674459 Oct 18 07:15 libreadline.so.6.0
-rw-r--r-- 1 root root  166578 Oct 18 06:43 libhistory.old
lrwxrwxrwx 1 root root  17 Oct 18 06:43 libhistory.so.5 ->
libhistory.so.5.2

-r-xr-xr-x 1 root root  109183 Oct 18 06:43 libhistory.so.5.2
-rw-r--r-- 1 root root 532 Oct 18 06:43 libreadline.old
lrwxrwxrwx 1 root root  18 Oct 18 06:43 libreadline.so.5 ->
libreadline.so.5
.2
-r-xr-xr-x 1 root root  650223 Oct 18 06:43 libreadline.so.5.2


# ls -lt /usr/local/lib64
total 1328
-r-xr-xr-x 1 root root 674459 Oct 18 07:19 libreadline.so.6
-r-xr-xr-x 1 root root 674459 Oct 18 07:19 libreadline.so.6.0

# ldd /usr/local/lib/libreadline.so
linux-vdso.so.1 =>  (0x7fff74957000)
libc.so.6 => /lib64/libc.so.6 (0x7f295027f000)
/lib64/ld-linux-x86-64.so.2 (0x7f295082b000)

# zypper install R-base
Retrieving repository 'R10.1-base' metadata [error]
Repository 'R10.1-base' is invalid.
[|] Repository type can't be determined.
Please check if the URIs defined for this repository are pointing to a valid
rep
ository.
Warning: Disabling repository 'R10.1-base' because of the above error.
Retrieving repository 'R12.2-base' metadata [error]
Repository 'R12.2-base' is invalid.
[|] Repository type can't be determined.
Please check if the URIs defined for this repository are pointing to a valid
rep
ository.
Warning: Disabling repository 'R12.2-base' because of the above error.
Loading repository data...
Reading installed packages...
Resolving package dependencies...

Problem: nothing provides libreadline.so.6 needed by
R-patched-2.12.0-3.1.i586
 Solution 1: do not ask to install a solvable providing R-base
 Solution 2: break R-patched by ignoring some of its dependencies

Choose from above solutions by number or cancel [1/2/c] (c):

-- 
View this message in context: 
http://r.789695.n4.nabble.com/R-installation-failed-on-SUSE-Linux-libreadline-so-6-needed-tp2999786p2999786.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


[R] biglm: how it handles large data set?

2010-10-31 Thread noclue_


I am trying to figure out why 'biglm' can handle large data set... 

According to the R document - "biglm creates a linear model object that uses
only p^2  memory for p variables. It can be updated with more data using
update. This allows linear regression on data sets larger than memory."

After reading the source code below, I still could not figure out how
'update'  implements the algorithm...

Thanks for any light shed upon this ... 

> biglm::biglm

function (formula, data, weights = NULL, sandwich = FALSE) 
{
tt <- terms(formula)
if (!is.null(weights)) {
if (!inherits(weights, "formula")) 
stop("`weights' must be a formula")
w <- model.frame(weights, data)[[1]]
}
else w <- NULL
mf <- model.frame(tt, data)
mm <- model.matrix(tt, mf)
qr <- bigqr.init(NCOL(mm))
qr <- update(qr, mm, model.response(mf), w)
rval <- list(call = sys.call(), qr = qr, assign = attr(mm, 
"assign"), terms = tt, n = NROW(mm), names = colnames(mm), 
weights = weights)
if (sandwich) {
p <- ncol(mm)
n <- nrow(mm)
xyqr <- bigqr.init(p * (p + 1))
xx <- matrix(nrow = n, ncol = p * (p + 1))
xx[, 1:p] <- mm * model.response(mf)
for (i in 1:p) xx[, p * i + (1:p)] <- mm * mm[, i]
xyqr <- update(xyqr, xx, rep(0, n), w * w)
rval$sandwich <- list(xy = xyqr)
}
rval$df.resid <- rval$n - length(qr$D)
class(rval) <- "biglm"
rval
}

---
-- 
View this message in context: 
http://r.789695.n4.nabble.com/biglm-how-it-handles-large-data-set-tp3020890p3020890.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


[R] SVD, UV-Decomposition and NMF

2011-01-10 Thread noclue_

I am reading the Mining of Massive Datasets Book by Rajaraman and 
Ullman.  It has a good explanation of Recommendation System at Chapter 
9. 

But what are the relationship between 

1) SVD (Singular Decomposition)
2) UV-Decomposition 
3) NMF (Non-negative Matrix Factorization)

In particular, it seems 2) and 3) can be very similar. Is it right?

Thanks.

-- 
View this message in context: 
http://r.789695.n4.nabble.com/SVD-UV-Decomposition-and-NMF-tp3208273p3208273.html
Sent from the R help mailing list archive at Nabble.com.

[[alternative HTML version deleted]]

__
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 code.


[R] 64-bit R on 64-bit Windows box... Still not enough memory?!

2010-08-05 Thread noclue_

I have a 64-bit windows box -
Intel Xeon CPU E7340 @ 2.4GHz 31.9GB of RAM
I have R 2.11.1 (64bit) running on it.

My csv data is 3.6 GB (with about 15 million obs, 120 variables.)

I have successfully imported the data above into R. No problem.

Now I am trying to run 'rpart' on my data.  But I got the following error :

Error: cannot allocate vector of size 53.5 Mb
In addition: Warning messages:
1: In lapply(x, "is.na") :
  Reached total allocation of 32764Mb: see help(memory.size)
2: In lapply(x, "is.na") :
  Reached total allocation of 32764Mb: see help(memory.size)
3: In lapply(x, "is.na") :
  Reached total allocation of 32764Mb: see help(memory.size)
4: In lapply(x, "is.na") :
  Reached total allocation of 32764Mb: see help(memory.size)
> 
===
Can anybody give me a hint on how to solve this?
Thanks!
=


-- 
View this message in context: 
http://r.789695.n4.nabble.com/64-bit-R-on-64-bit-Windows-box-Still-not-enough-memory-tp2315742p2315742.html
Sent from the R help mailing list archive at Nabble.com.

[[alternative HTML version deleted]]

__
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 code.


Re: [R] 64-bit R on 64-bit Windows box... Still not enough memory?!

2010-08-06 Thread noclue_

> .Machine$sizeof.pointer 
[1] 4
-- 
View this message in context: 
http://r.789695.n4.nabble.com/64-bit-R-on-64-bit-Windows-box-Still-not-enough-memory-tp2315742p2316493.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


Re: [R] 64-bit R on 64-bit Windows box... Still not enough memory?!

2010-08-06 Thread noclue_

sorry I opened a previous R version. 

Here is my 64-bit R session -

> .Machine$sizeof.pointer 
[1] 8


-- 
View this message in context: 
http://r.789695.n4.nabble.com/64-bit-R-on-64-bit-Windows-box-Still-not-enough-memory-tp2315742p2316970.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


[R] Looking for an image (R 64-bit on Linux 64-bit) on Amazon EC2

2010-08-25 Thread noclue_

I have found an existing image on Amazon EC2 including R. But unfortunately,
it is 32-bit 
R on 32-bit Linux.

Does anybody know if there exists an mage (R 64-bit on Linux 64-bit) on 
Amazon EC2?

Or how can I install 64-bit R on my own Linux instance there?

Thanks.
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Looking-for-an-image-R-64-bit-on-Linux-64-bit-on-Amazon-EC2-tp2338938p2338938.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


Re: [R] Looking for an image (R 64-bit on Linux 64-bit) on Amazon EC2

2010-08-25 Thread noclue_


>> You have a 64 bit Linux?  If so... 

>>Dowload the sources 

Do you mean download Linux kernel source code and then compile it on Amazon
EC2?


-- 
View this message in context: 
http://r.789695.n4.nabble.com/Looking-for-an-image-R-64-bit-on-Linux-64-bit-on-Amazon-EC2-tp2338938p2339072.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


Re: [R] Looking for an image (R 64-bit on Linux 64-bit) on Amazon EC2

2010-08-27 Thread noclue_

Thanks!  But how could I find out their names on Amazon EC2?
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Looking-for-an-image-R-64-bit-on-Linux-64-bit-on-Amazon-EC2-tp2338938p2357731.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


[R] Decision Tree in Python or C++?

2010-09-04 Thread noclue_


Have anybody used Decision Tree in Python or C++?  (or written their own 
decision tree implementation in Python or C++)?  My goal is to run decision
tree on 8 million obs as training set and score 7 million in test set.

I am testing 'rpart' package on a 64-bit-Linux + 64-bit-R environment. But 
it seems that rpart is either not stable or running out of memory very 
quickly. (Is it because R is passing everything as copy instead of as object
reference?)

Any idea would be greatly appreciated!  

Have a nice weekend!
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Decision-Tree-in-Python-or-C-tp2526810p2526810.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.


[R] R: Collaborative Filtering

2010-06-10 Thread noclue_


Is Collaborative Filtering available in R?

It seems I could not find any R package implementing Collaborative
Filtering?

Thanks!
-- 
View this message in context: 
http://r.789695.n4.nabble.com/R-Collaborative-Filtering-tp2249934p2249934.html
Sent from the R help mailing list archive at Nabble.com.

__
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 code.