ggplot2 would not install via RStudio

ggplot2 would not install via RStudio, and the detailed errors ran:

plyr not available for R3.0.2

reshape2 not available for R3.0.2

Now R3.0.2 is the default for Ubuntu14.04. so a quick google turned up the following SO discussions:

One thing that happened for me is that the version of R provided by my linux distribution (R version 3.0.2 provided by Ubuntu 14.04) was too old for the latest version of the package available on CRAN (in my case, plyr version 1.8.3 as of today). The solution was to use the packaging system of my distribution instead of trying to install from R (apt-get install r-cran-plyr  got me version 1.8.1 of plyr).

http://stackoverflow.com/questions/25721884/how-should-i-deal-with-package-xxx-is-not-available-for-r-version-x-y-z-wa

and apt-get install r-cran-plyr    worked as did the equivalent for reshape2;

Subsequently was able to install ggplot2 and then the shiny app that I wanted to run. Good.

NOTE   TODO   go over the ggplot2 tutorials

The Moneyball Effect: How smart data is transforming criminal justice, healthcare, music, and even government spending

TED Blog

Anne Milgram reveals what happened when New Jersey  moneyballed its criminal justice system. Photo: Marla Aufmuth Anne Milgram reveals what happened when New Jersey moneyballed its criminal justice system. Photo: Marla Aufmuth

When Anne Milgram became the Attorney General of New Jersey in 2007, she was stunned to find out just how little data was available on who was being arrested, who was being charged, who was serving time in jails and prisons, and who was being released.

[ted_talkteaser id=1914]“It turns out that most big criminal justice agencies like my own didn’t track the things that matter,” she says in today’s talk, filmed at TED@BCG. “We didn’t share data, or use analytics, to make better decisions and reduce crime.”

Milgram’s idea for how to change this: “I wanted to moneyball criminal justice.”

Moneyball, of course, is the name of a 2011 movie starring Brad Pitt and the book it’s based on, written by Michael Lewis in 2003. The term refers to a practice adopted…

View original post 832 more words

No, not every database was created equal. Here’s how they stand out

NoSQL

Gigaom

SQL or NoSQL? In-memory or hard disks? Graph? These questions have been top of mind in recent years as developers and IT administrators check out new-age databases capable of handling scale-out data sets. Executives from four databases showed how they stand out in a hot market at GigaOM’s Structure:Data conference on Thursday.

Emil Eifrem, CEO of Neo Technology, touted the power of Neo4j and other graph databases to show relationships among disparate varieties of data with nodes, edges and key-value properties. (Think of Facebook’s (s fb) Graph Search as one version.) The style takes inspiration from the connections among neurons and synapses inside the brain, Eifrem said. But, like other NoSQL databases, Neo Technology’s Neo4j product doesn’t use the SQL programming language, which could limit its adoption among enterprises.

Damian Black, CEO of SQLstream, touted his database’s use of SQL, calling it “lingua franca for data management.” Sure, it…

View original post 6,773 more words

Firejail – A Security Sandbox for Mozilla Firefox

Security – a growing problem ( even on Linux ) but this Firejail sandbox for Firefox might just come in handy!

l3net - a layer 3 networking blog

We often find ourselves running applications we received in binary format. These include not only traditional software installed on our computers, but also unauthenticated programs received over the network and run in web browsers. Most of the time these applications are too complex to be bug-free, or can come from an adversary trying to get access to our system.

Firejail is a SUID sandbox program that reduces the risk of security breaches by restricting the running environment of untrusted applications. The core technology behind Firejail is Linux Namespaces, a virtualization technology available in Linux kernel. It allows a process and all its descendants to have their own private view of the globally shared kernel resources, such as the network stack, process table, mount table, IPC space.

Introducing Firejail

The program is written in C and only needs libc and POSIX threads (libpthreads), available by default on any Linux platform. The

View original post 659 more words

15 Sorting Algorithms in 6 Minutes – YouTube

Nice visual description

Blender Fox

An interesting look at 15 different sorting algorithms with a visual representation of how well they run. Everything from the classic Bubble Sort, Heap Sort and Quick Sort. Including a few I didn’t even know about. Radix, Cocktail Shaker, Gnome.

Bitonic is a really weird sort method. And Bogo, well, I have no clue what that one is trying to do.

View original post

UML Class Diagram

Class Diagrams.

 

The purpose of a class diagram is to depict the classes within a model. In an object oriented application classes have attributes (ie. member variables), operations (member functions) and relationships with other classes. The UML class diagram is used to depict all these.

The fundamental element of the class diagram is a square or rectangular icon that represents a class.

 

A class icon rectangle is often divided into three compartments. The topmost compartment

contains the name of the class. The middle compartment contains a list of attributes (member variables), and the bottom compartment contains a list of operations (member functions).

In many diagrams, the bottom two compartments are omitted for improved clarity. Even when they are present, they often do not list every attribute and operations.

 

This ability to abbreviate an icon is one of the hallmarks of UML. The class icons in UML diagrams are frequently abbreviated for clarity. There is typically never a need to show every attribute and operation of a class on any diagram.

 

Notice that, in the diagrams, that each member variable is followed by a colon and by the type of the variable. If the type is redundant, or otherwise unnecessary, it can be omitted. Notice also that the return values follow the member functions in a similar fashion. Again, these can be omitted.

 

Inheritance

The inheritance relationship in UML is depicted by a triangular arrowhead. This arrowhead points to the base class. One or more lines flow from the base of the arrowhead connecting it to the derived classes.

 

Aggregation / Association

The weak form of aggregation is denoted with an open diamond. This relationship denotes that the aggregate class (the class with the white diamond touching it) is in some way the “whole”, and the other class in the relationship is somehow “part” of that whole.

A question newcomers to UML often ask is “What is the difference between an aggregation and an association”? The difference is subtle, and often not visible from actual code. Aggregation denotes whole/part relationships whereas associations do not. However, there is not likely to be much difference in the way that the two relationships are implemented. That is, it would be very difficult to look at the code and determine whether a particular relationship ought to be aggregation or association. For this reason many practitioners ignore the aggregation relationship altogether.

 

Interfaces

There are classes that have nothing but pure virtual functions. In Java such entities are not classes at all; they are a special language element called an interface. UML has followed the Java example and has created some special syntactic elements for such entities.

 

Conclusion

In this blog post I have described a few of the notational elements of UML. In future posts I  will expand upon this notation by showing how to use it for solving some real world software design issues.

UML State Diagrams(2) – Concurrent States

In the previous post i described a state diagram for a Sales Order Processing system that was based on the availability of stock items. In practice we would almost certainly requre state that were dependent on payment authorisation as well as item availablity. This leads to the notion of concurrent states, where one group of states in a diagram model the stock item availability and a separate group of states model the payment authorisation process.

The diagram below illustrates this concept of concurrent states. These concurrent states are represented in two distinct swimlanes. The concurrent sections of the state diagram a places in which, a given order can be in two different states. When an order leaves a concurrent state it will be i a single state only.

The concurrent state diagrams are useful where a given object has multiple sets of independent behaviours. In practice, I prefer to limit the number of concurrent states to a small number, usually two or three, and when I have more than three I would normally split out the independent behaviours into separate objects as I find that this improves diagram clarity and readability, as well as improving the integrity of subsequent code.

State diagrams are useful for describing the behaviour of objects that often span more than one Use case. For models that describe the interaction of several objects I prefer to use the UML Interaction Diagram.

ga_algorithm_statechart

In the next blog post I will describe the UML Interaction Diagram, and provide some examples of its use to describe the interplay of messaging and events between  co-operating groups of objects.

James Goode, Tendron Systems Ltd

UML State Diagram ( Part-1 )

UML State Diagrams

State diagrams are one of the most valuable techniques available for describing the real-time behaviour of a software system. A well constructed state diagram denotes all the states that a specific object or class can be in. In addition a state diagram describes when and how transitions between the states occur as a result of external events that affect the object. Usually a state diagram is written for each class that exhibits real time behaviour.

The UML state diagram has its origins in earlier research work on real time systems and represents the distilled expertise of three decades of research by numerous experts, David Harel, Ed Yourdon, Grady Booch, James Rumbaugh among others.

UML State Diagram

UML State Diagram

Continue reading