Displaying 20 results from an estimated 700 matches similar to: "Convert "ragged" list to matrix"
2008 Feb 20
1
Deleting multiple rows based on a variable
Hello,
I have a dataset which consists of 9 columns (variables) and 35 rows
(observations). I am doing a simple linear regression of one variable
on the other. There are some observations that are outliers and I would
like to remove them based on another variable (it's a unique, numeric
variable). How do you tell R to remove multiple rows (observations)
based on a variable value?
2009 Apr 23
1
Parenthesis around date/time using chron?
Hi,
I've been using the chron package to convert excel time into
month/day/year and h:m:s formats, specifically for use as axis labels.
I've come across something I don't quite understand.
### Here are some excel times:
dat = c(39083, 39083.00694, 39083.01389, 39083.02083, 39083.02778,
39083.03472, 39083.04167, 39083.04861, 39083.05556, 39083.0625
)
### I create
2009 May 31
1
using chron vector with boxplot
Hi,
I'm having trouble using dates (created using library(chron)) as
groupings for a boxplot. I have 10 repeat measurements of a variable
within an individual day. The measurements were done over 10 days. I
would like to plot the measurements as a box and wisker plot (using
boxplot or something similar) where the days (as chron object) would be
the grouping and the repeated measurements
2008 Feb 22
1
How to Include greek symbol in axis label?
Hi, I'm fairly new to R, so hopefully this is an easy question...
On a plot, I would like to have the y label read: "Response(phi)" with phi = the greek character. From old posts I've found this:
title(ylab=expression(paste("Response (", phi, ")")))
This displays nicely, but in the default font. I would like to use font=6 (which is the font of the other
2009 May 12
1
Can anyone suggest some r packages for Experimental Designs, specifically for choice and conjoint??? (or is intersted in helping me make 1)
Afternoon everyone,
I''ve spent the last week or so looking at all the experimental design
packages I can find in R. AlgDesign, design.conf and BHH2 being the best one
I could find.
Unfortunately none of these do a particularly good job for complex designs,
in particular for conjoint or discrete choice. (or perhaps they do, and I
can''t make them work correctly)
2005 Dec 23
13
how to form.rest in RJS
is there any way to Form.reset (clear all fields of the form ) in
form_remote_tag generated form?
I want to reset fields after ''submit'' in .rjs.
--
Hiroshi Takagi <gollum-u1eKKkw+WM0gE89CWYshPg@public.gmane.org>
2012 Nov 08
3
Failed to access console after launching LXC through libvirt
Hi,
I'm trying to manage LXC instances through OpenStack, which use libvirt as
a virtualization driver layer. After launching LXC instance, I simply could
not attach to the console.
virsh # list
Id Name State
----------------------------------
14366 instance-00000078 running
virsh # console 14366
Connected to domain instance-00000078
Escape character is ^]
And it keeps
2017 Oct 18
2
Can we disable write to /sys/fs/cgroup tree inside container ?
Hi all
Each lxc container on node have mounted tmpfs for cgroups tree:
[root-inside-lxc@tst1 ~]# mount | grep cgroups
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup
(rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/cpuset type cgroup
(rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/memory type cgroup
(rw,nosuid,nodev,noexec,relatime,memory)
cgroup on
2010 Oct 04
3
can't find and install reshape2??
Hi everyone,
I’m trying to install reshape2.
But when I click on “install package” it’s not coming up!?!?! I’m getting
reshape, but no reshape2?
I’ve also tried download.packages(reshape2, destdir="c:\\") &
download.packages(Reshape2, destdir="c:\\")…but no luck!!!
Does anyone have any ideas what could be going on?
Chris Howden
Founding Partner
Tricky
2012 Jan 25
2
How to change libvirt / cgroup interaction?
Hi there,
Do you know if there is a way to modify how libvirt interacts with the
cgroup?
Because, I successfully add the /dev/net/tun support in my LXC container
by doing:
echo c 10:200 rwm >> /cgroup/libvirt/lxc/instance-00000005/devices.allow
But when I restart the instance/LXC container, this option has gone.
How can I make this persistant? Is there a configuration file?
Thanks
2013 Apr 18
1
libvirt 1.0.3 Vs 1.0.4 / cgroup devices
Hi there,
I am using libvirt with lxc to create fedora 16 & 18 containers on fedora
18 host.
first I did the setup with libvirt 1.0.3 and everything worked fine, then
after upgrading to libvirt 1.0.4, I could not create character device on
the guests :
Test on the guest1 :
# ls -l /dev
total 0
lrwxrwxrwx. 1 root root 10 Apr 17 21:18 console -> /dev/pts/0
lrwxrwxrwx. 1 root root 11
2011 Jun 08
5
LXC and Dahdi
Howdy,
I am playing around with asterisk within an LXC container on Ubuntu 11.04.
I have asterisk (1.4.42) running fine, but want access to dahdi_dummy for
timing (meetme). I have dahdi installed on the "host", and dahdi_dummy is
loaded:
root at astnorth:/# ls -ltr /dev/dahdi
total 0
crw-rw---- 1 root root 196, 250 2011-06-08 13:59 transcode
crw-rw---- 1 root root 196, 253
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
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:
2010 Sep 01
8
how to replace NA with a specific score that is dependant on another indicator variable
Hi everyone,
I’m looking for a clever bit of code to replace NA’s with a specific score
depending on an indicator variable.
I can see how to do it using lots of if statements but I’m sure there most
be a neater, better way of doing it.
Any ideas at all will be much appreciated, I’m dreading coding up all those
if statements!!!!!
My problem is as follows:
I have a data set with
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`
2011 Jun 03
0
ragged data.frame? using plyr
I have a dataset that looks like:
set.seed(144)
sam<-sample(1000,100)
dat<-data.frame(id=letters[1:10],value=rnorm(1000),day=c(rep(1,100),rep(2,100),rep(3,100),rep(4,100),rep(5,100)))
I want to "normalise" it using the following function (unless you have
a better idea...):
adj.values<-function(dframe){
value_mean<-mean(dframe$value)
value_sd<-sd(dframe$value)
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 <-
2010 Oct 12
2
merging and working with BIG data sets. Is sqldf the best way??
Hi everyone,
I’m working with some very big datasets (each dataset has 11 million rows
and 2 columns). My first step is to merge all my individual data sets
together (I have about 20)
I’m using the following command from sqldf
data1 <- sqldf("select A.*, B.* from A inner join B
using(ID)")
But it’s taking A VERY VERY LONG TIME to merge just 2 of the datasets