I have a dataset showing points, with a category for each point and its
location.
I simply want to display my points, in a way that users can toggle the points
on and off by category.
Where I have two objects in the same category I'd like to display them nudged
to appear as two distinct, but v
Hi Rgonauts,
I am plotting 3 variables from one data set on one plot. Two of them as a
stacked bar and a ratio on a completely different scale, so I need to put one
of the axes on the top of the plot for clarity. Whilst this is not good
visualisation practice, there is a valid reason why, in
Hi Rgonauts,
I am trying to parse some xml files of transport data using the TransExchange
format (in this case bus routing information) and obtain some data.frames for
onward processing for a GIS related task. Ideally I need them in .csv files.
Each file (an example is attached) contains up t
I've got data frame containing a simple frequency distribution of numbers of
people in three age groups by area.
df1<-data.frame(area=c(1,2),group1=c(2,3),group2=c(1,5),group3=c(4,0))
df1
I want to get a data frame with one record per person (in my case 15 of them)
which would look like this, w
I am trying to encrypt postcodes (zipcodes) which, in my datasets, are
strings with 8 characters, including spaces. By referring to other help
files and other R resources I've built some (clumsy looking) code that turns
a postcode into an output I'm happy with. See below.
library("PKI")
#make a
I've got a simple data.frame of a facotr variable called 'case' which indicates
one subject and a date of an event ('obs'), each row representing an
observation. One case can have many (or few) observations over time in the data
set.
I've created a crude data.frame by way of a clunky but reprod
One of those simple tasks, but I can't get to first base with it. I've got a
data set of observations of subjects over a 10 year period beginning on 1st
April 2001 and ending on 31st March 2011. One of may variables is a score
based on an intervention on a given date. Before the intervention t
#some sample data:
library(Hmisc)
set.seed(33)
df<-data.frame(x=(sample(letters[1:10],1000,replace=TRUE)),y=rnorm(1000,mean=20,sd=15))
x is a category from a to J, say a geographical area, into which an observation
y falls, y being a score. Now if I want to put my score into quantiles
(quintile
Further to my recent post on this topic and thanks to help received already
(thanks BTW), I've got back-to-back plots working nicely to give me population
pyramids, with some overlaid point data from a different time period, using the
code below.
#packages
library(ggplot2)
library(reshape2)
lib
Hi, I'm making a simple population pyramid using two back-to-back bar plots for
18 different age groups with totals for males and females.
Yesterday I achieved a fairly serviceable plot using the following.
library(ggplot2)
library(reshape2)
library(plyr)
#make sample data
df<-data.frame(ag=c(1:
I've got a data set of about 5,000 observations with a zero-inflated count
response variable, two predictor variables and a variable which is effectively
an area of opportunity, which I want to use as an offset term (all continuous).
I want to explore the association between these variables, in
I have a population of subjects each with a variable which has been captured at
a baseline date. Then for many subjects (but not all) an intervention has
occurred and the variable has changed at one or more time points after the
baseline date. So my dataset consists of a subject ID (x), which
Hi Just a quick problem that I hope is simple to resolve. I'm doing some work
with zero inflated poisson models using the pscl package. I can build models
using zeroinfl and get outputs fom them with no problem, but when I try to use
the predict.zeroinfl function, I get Error: could not find fu
I'm creating a stacked bar chart using the likert command in the HH package.
My data are in a data frame, with two numeric variables and a categorical
variable, I can't get likert to use the column containing the categorical
variable as a my y axis label.
Here is a quick example:
library(HH)
Hi, I've been looking at ways to make pyramid plots in R. I like the
pyramid.plot method in plotrix as it seems the simplest to use and building
them in ggplot looks a bit more code intensive than I'd like, being as I'm new
to R. This package does pretty much what I need it to do, however I ca
15 matches
Mail list logo