Displaying 14 results from an estimated 14 matches similar to: "ragged data.frame? using plyr"
2024 Dec 10
1
Heat maps containing two types of variables
I am working with a heat map, as in the REPREX below. The code works
fine as long as "bigger numbers imply greener and smaller numbers imply
redder". These are time series where bigger numbers are "better", like
total employment for example. But I also have cases within the heat map
where "bigger numbers imply redder and smaller numbers imply greener".
These are
2007 May 03
0
[patch] Mac Universal Binaries
Peter Grayson wrote:
> Can you elaborate on what kind of CPU vagaries come into play besides
> endianess?
One issue I found was the cpu behaviour when converting from
float/double to int32 when the source float is outside the range
of values that can be represented by the int32.
For instance:
float int32_ppc in32_x86
2147483649.0 2147483647 -2147483648
2007 May 03
2
[patch] Mac Universal Binaries
> One issue I found was the cpu behaviour when converting from
> float/double to int32 when the source float is outside the range
> of values that can be represented by the int32.
>
> For instance:
>
> float int32_ppc in32_x86
> 2147483649.0 2147483647 -2147483648
> 2147483648.0 2147483647 -2147483648
> 2147483647.0
2004 Sep 13
1
Adding ranks to a repeatedly ragged array
How can I add an extra column containing the rank
to a ragged array indexed by more than one grouping
factors?
E.g. with the barley dataset:
How can I to add an additional column ``rank''
containing the rank of the ``yield'' of
the different varieties in relation to the indices
``year'' and ``site'' to the barley dataframe?
I achieved to calculate the ranks with:
2006 Jul 19
2
Aligning ragged text columns
Can anyone please suggest how I can print:
a <- matrix(c(
"Heading 1", "This is some info\nabout heading 1",
"Heading 2", "This is some info\nabout heading 2",
), byrow=T, nrow=2)
to look like:
Heading 1 This is some info
about heading 1
Heading 2 This is some info
about heading 2
(if you're not using a fixed width
2007 Nov 24
1
ragged array with append
I wonder what's the right way in R to do the following -- placing
objects of the same kind together in subarrays of varying length.
Here's what I mean:
> word <- c("a","b","c","d","e","f","g","h","i","j")
> kind <- c(1,1,1,2,3,4,5,5,7,7)
> d <-
2011 Dec 20
1
Convert ragged list to structured matrix efficiently
Hi All,
I'm wanting to convert a ragged list of values into a structured matrix for
further analysis later on, i have a solution to this problem (below) but
i'm dealing with datasets upto 1GB in size, (i have 24GB of memory so can
load it) but it takes a LONG time to run the code on a large dataset. I
was wondering if anyone had any tips or tricks that may make this run
faster?
Below is
2007 May 03
2
[patch] Mac Universal Binaries
On 5/3/07, Erik de Castro Lopo <mle+la@mega-nerd.com> wrote:
> Peter Grayson wrote:
>
> Personally I think universal binaries are a bad idea.
They have obviously served some purpose, but I tend to agree that the
concept does not seem to scale well once outside the Apple microcosm.
> For one of my projects, libsndfile, endian issues is not the only
> think that breaks in
2001 Oct 22
1
statistics for ragged arrays: loop to vector
Dear R users,
I am currently writing a MCMC algorithm for spatial Poisson model. One
problem which I need to solve is as follows:
I have a vector X[1:J] which describes characteristics of cells of a
rectangular grid. Further, for each cell I have a list of adjascent
cells adj[] and the vector listing numbed of adjascent cells num[].
Thus if I want to list cells adjascent to cell i I write
2011 Oct 16
2
question: ragged array
Hello,
I have a big problem which I’m just not able to solve.
I created the following mean value from the following dataset structure:
Id |value
1 | 2
1 | 3
1 | 4
2 | 2
2 | 1
3 | 5
4 | 3
etc.|etc.
with the command:
mean_rating <- tapply(ratok$value, ratok$project_id , mean,simplify = FALSE)
this gives me a ragged array:
> mean_rating [1]
$`14`
2008 Oct 03
2
Ragged time series data
Hi and thanks in advance,
I am fairly new with R so I hope this problem isn't too amateur.
I have a vector of count data which correspond to vectors of date (%m/%d/%Y)
and time of day (%H:%M:%S).
I am trying to compute various statistics (e.g. daily max) by lumping the
data together by day. I have been able to utilize tapply() and group the
counts together, but with the method I use I end
2007 Mar 16
1
Fast lookup in ragged array
Hello,
I'm running an algorithm for graph structural cohesion that requires
a depth-first search of subgraphs of a rather large network. The
algorithm will necessarily be redundant in the subgraphs it recurses
to, so to speed up the process I implemented a check at each subgraph
to see if it's been searched already.
This algorithm is very slow, and takes days to complete on a
2009 Jun 22
5
Convert "ragged" list to matrix
Hi,
I have a list made up of character strings with each item a different
length (each item is between 1and 6 strings long). Is there a way to
convert a "ragged" list to a matrix such that each item is its own row?
Here is a simple example:
a=list();
a[[1]] = c("a", "b", "c");
a[[2]] = c("d", "e");
a[[3]] = c("f",
2012 Oct 23
10
How to pick colums from a ragged array?
I have a large dataset (~1 million rows) of three variables: ID (patient's name), DATE (of appointment) and DIAGNOSIS (given on that date).
Patients may have been assigned more than one diagnosis at any one appointment - leading to two rows, same ID and DATE but different DIAGNOSIS.
The diagnoses may change between appointments.
I want to subset the data in two ways:
- define groups