Using a Linux only package in Windows #rstats

Here is some R code for using a R package that has only a tar.gz file available (used to load R packages in Linux) and no Zip file available (used to load R packages in Windows).

Step 1- Download the tar.gz file.

Step 2 Unzip it (twice) using 7zip

Step 3 Change the path variable below to your unzipped, downloaded location for the R sub folder within the package folder .

Step 4 Copy and Paste this in R

Step 5 Start using the R package in Windows (where 75% of the money and clients and businesses still are)

Caveat Emptor- No X Dependencies (ok!)

path="C:\\Users\\KUs\\Desktop\\segue\\R"
b=dir(path)
c=length(b)
for (i in 1:c){source(gsub(" ","",paste(path,"\\",b[i])))}
ls()

 

R2D2

Running R and RStudio Server on Red Hat Linux RHEL #rstats

Installing R

  • sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

(OR sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm )

THEN

  • sudo yum install R

THEN

  • sudo R

(and to paste in Linux Window- just use Shift + Insert)

To Install RStudio (from http://www.rstudio.com/ide/download/server)

32-bit

  •  wget http://download2.rstudio.org/rstudio-server-0.97.320-i686.rpm
  •  sudo yum install --nogpgcheck rstudio-server-0.97.320-i686.rpm

OR 64-bit

  •  wget http://download2.rstudio.org/rstudio-server-0.97.320-x86_64.rpm
  •  sudo yum install --nogpgcheck rstudio-server-0.97.320-x86_64.rpm

Then

  • sudo rstudio-server verify-installation

Changing Firewalls in your RHEL

-Change to Root

  • sudo bash 

-Change directory

  • cd etc/sysconfig

-Read Iptables ( or firewalls file)

  • vi iptables

( to quite vi , press escape, then colon :  then q )

-Change Iptables to open port 8787

  • /sbin/iptables -A INPUT -p tcp --dport 8787 -j ACCEPT

Add new user name (here newuser1)

  • sudo useradd newuser1

Change password in new user name

  • sudo passwd newuser1

Now just login to IPADDRESS:8787 with user name and password above

(credit- IBM SmartCloud Support ,http://www.youtube.com/watch?v=woVjq83gJkg&feature=player_embedded, Rstudio help, David Walker http://datamgmt.com/installing-r-and-rstudio-on-redhat-or-centos-linux/, www.google.com ,Michael Grieb)
 

 

Running R GUI on Google Compute

I wanted to run R GUIs ( rattle, Rcmdr, Deducer) on my Google Compute Instance, but didnt know how to figure out how to enable x11.

Initially I just tried to enable x11 forwarding in the local ssh (Ubuntu) and remote sshd( GCE), but it still needed some more.

Note I use gedit to edit files locally ( since it is easier) and vi to edit files remotely ( because I didnt have a graphical environment there yet) . I used vi help from the link here  (basically sudo vi filename opens the file in Linux, you scroll down and press Insert to write your changes, then hit escape, then write this to save and quit :qw ( or :q! to NOT save and quit), your mouse is quite useless and the arrow keys dont help much in vi- I assure you that)

[local]
/etc/ssh_config or ~/.ssh/config
ForwardX11 yes

restarted local ssh

[remote]
/etc/sshd_config
X11Forwarding yes

restarted remote sshd

Well this is how it is done- following is a copy and paste from actual discussion-

here are two steps you have to do in order to run X-windows applications on your instance.

1) You have to install some X-windows applications on your instance.  I used the command
sudo apt-get install xterm
which works on Ubuntu.  On Centos, you would use the command
yum install xterm
but I didn’t test that.
2) You have to create an X-windows tunnel through SSH.  You do that with the -X switch to the gcutil ssh command:
 gcutil ssh –ssh_arg -X INSTANCE
When you login to the instance, verify that the tunnel is in place.
$rman@test-pd:~$ echo $DISPLAY
localhost:10.0
rman@test-pd:~$
By way of contrast, this is what it looks like if the tunnel didn’t work:
rman@test-pd:~$ echo $DISPLAY
rman@test-pd:~$

Hat Tip- gce discussion group on google groups  https://groups.google.com/forum/#!forum/gce-discussion  and Jeff Silverman from the GCE team.

Modifying Sources File in Linux for Monet DB Installation

If you like me are a Linux newbie, the following helps in modifying the source file . i.e for adding in sources for Monet DB installation

sudo sh -c ‘echo “deb http://dev.monetdb.org/downloads/deb/ precise monetdb” > /etc/apt/sources.list.d/monetdb.list’
sudo sh -c ‘echo “deb-src http://dev.monetdb.org/downloads/deb/ precise monetdb” > /etc/apt/sources.list.d/monetdb.list’

 

ps- I was on Google compute/ Linux

 

Amazon drops prices of Linux AMIs by ~20%

Amazon cloud gets more exciting. We are still waiting for the Oracle and Google public clouds (compute) to open up out of beta! See their (rather cluttered) blog

http://aws.typepad.com/aws/2012/10/new-ec2-second-generation-standard-instances-and-price-reductions-1.html

Today, we are excited to announce a new generation of the original Amazon EC2 instance family. Second generation Standard instances (M3 instances) provide customers with the same balanced set of CPU and memory resources as first generation Standard instances (M1 instances) while providing customers with 50% more computational capability/core.

M3 instances are currently available in two instance types; extra-large (m3.xlarge) and double extra-large (m3.2xlarge). Examples of applications that can benefit from the additional CPU horsepower of these new instances include media encoding, batch processing, web servers, caching fleets, and many others. Currently, M3 instances are available in the US East (N. Virginia) Region starting at a Linux On-Demand price of $0.58/hr for extra-large instances. Customers can also purchase M3 instances as Reserved Instances or as Spot instances. We will introduce M3 instances in additional regions in the coming months.

To learn more about Amazon EC2 instance types and to find out which instance type might be useful for you, please visit the Amazon EC2 Instance type page.

Pricing Change for M1 Standard Instances
Along with the introduction of the M3 Standard instance family, we are announcing a reduction in Linux On-Demand pricing for M1 Standard instances in the US East (N. Virginia) and US West (Oregon) Regions by almost 19%. The new pricing is effective from November 1 and is described in the following table

Instance Type Previous Price New Price
m1.small $0.080 $0.065
m1.medium $0.160 $0.130
m1.large $0.320 $0.260
m1.xlarge $0.640 $0.520

You can find out more about pricing for all Amazon EC2 instances by visiting the Amazon EC2 pricing page.

 

Revolution Analytics and Pricing Analytics

Cost of 1 day of Revolution Analytics Training at http://www.revolutionanalytics.com/services/training/

 

1. Intro to R

Price:  Commercial: SGD$500.00
Academic:SGD$350.00

1 Singapore dollar = 0.8197 US dollars

10% Early Bird Discount Deadline: November 13, 2012 @ 12:00PM Pacific Time
Discount code: earlybird

2. (aptly titled Minimalistic Sufficient R…you think the ricing would be minimalistic.. but)

http://www.revolutionanalytics.com/services/training/public/minimalist-sufficient-r.php

Price: 

$750

$100 Early Bird Discount Deadline: November 16, 2012 @ 12:00PM Pacific Time
Discount code: earlybird

3.

Advanced R (Italian)

Price:  Commercial: €680.00
Academic: €480.00

1 euro = 1.2975 US dollars

4.

Big Data AnalyticS with RevoScaleR

Price:  $500 with 2 month Revolution R Enterprise workstation evaluation.

$700 with 1 year subscription of Revolution R enterprise workstation ($1500 value)

10% Early Bird Discount Deadline: October 30, 2012 @ 12:00PM Pacific Time
Discount code: early

5.

Revolution R Time Series Training

Price:  Commercial: S$1,200.00
Academic:S$750.00

10% Early Bird Discount Deadline: October 30, 2012 @ 12:00PM Pacific Time
Discount code: earlybird

so training costs differently different strokes for different folks I guess,

BUT me hearties.

Cost of 1 year of Revolution Enterprise= $1000

Thats a flat rate, so the Linux and Windows costs the same and so does the 32-bit and 64-bit

(see http://buy.revolutionanalytics.com/ )

( My comment- either Revo should give away the license for free to enterprises, rationalize training costs, seriously how can 2 days of training cost like a 1 year of license and the software is definitely quite good., or create a paid Amazon Ec 2 AMI for enterprises to rent the Revolution Analytics software (like SAP Hana ), or even on Windows Azure if they insist on hugging Microsoft, though I am clearly seeing various flavors of Linux beating Windows Server to a pulp in the Big Data market, though I am probably more optimistic on the Windows 8 on Surface but because of hardware not software/ Azure alternative to Amazon given Google’s delayed offering- I dont even know many many instance of Windows related HPC or HPA,  (/end_of_rant)

Annual Subscription
Includes software license and technical support
Price Quantity Total
Revolution R Enterprise Single-User Workstation (64-bit Windows) $1,000.00 $0.00
Revolution R Enterprise Single-User Workstation (32-bit Windows) $1,000.00 $0.00
Revolution R Enterprise Single-User Workstation (64-bit Red Hat 6 Enterprise Linux) $1,000.00 $0.00
Revolution R Enterprise Single-User Workstation (64-bit Red Hat 5 Enterprise Linux) $1,000.00 $0.00