Displaying 20 results from an estimated 10000 matches similar to: "Extracting a row number from a matrix"
2006 Jul 30
2
Reading multiple txt files into one data frame
Hello All,
I have a device that spews out experimental data as a series of text
files each of which contains one column with several rows of numeric
data. My problem is that for each trial it gives me one text file
(and I run between 30 to 50 trials at a time) and I would ideally like
to merge all these text files into one large data frame with each
column representing a single trial. It is not
2007 Mar 22
2
Colored boxes with values in the box
Hi all,
I have a x, y matrix of numbers (usually ranging from 0 to 40). I need
to group these numbers and assign a color to each group (for example 0
to 15 - Blue, 16-30- Yellow, and 31-40- Red). Then I need to draw a
rectangular matrix which contains X x Y boxes and each box has the
corresponding value from the input matrix and is also colored according
to which group (i.e red, yellow,
2006 Sep 19
4
Union of two data frames
Hi,
I have two data frames each with 5 columns and different number of
rows. some of the row names in one data frame are the same as the row
names in the other. I want to be able to merge the two data frames to
get a new data frame in which the duplicated row names are only shown
once with the data for the rest of the columns used from the first
data frame.
Essentially, I want to make a union
2006 Jul 30
1
Log color scale
Hi all,
In response to a previous post about plotting a numeric square matrix
as a colored matrix, I was referred to both image and the
color2D.matplot function in the plotrix package. Both have worked for
me thanks!!
However I need to plot my data in a log transformed color scale. Is
this possible? I will be happy to explain further, but basically I
need to do this because there are large
2006 Jul 31
1
RGB function
Hi all,
I created three separate square matrices (lets say R, G, and B). each
one contains a series of values between 0 and 1. I want to be able to
take for example R[1], G[1], B[1] and create a rgb color value into a
fourth matrix. I tried using the rgb function but I must be doing
something wrong because it fails with the following error message.
(list) object cannot be coerced to
2012 May 30
2
Extracting rows from a dataset
Dear R help,
I have a dataset with 1's and 0's.? Here, each row is the observation for an insect.? If the animal is present in light area at a particular time, response is 1 and if it is present in dark area, the response is 0.? I would like to do some formating on the data for analysis.? To be specific, I need the rows where the animal starts in the light (1), went to dark (0), and came
2012 Nov 02
2
Determine longest run of number
Does anybody know a way to determine the longest run of a number in a
vector of numbers?
For example if I have the following numbers: 0 0 1 1 1 1 0 1 1 0 0 0 1
1; how can I determine that the longest run of 1's = 4 and longest run
of 0's = 3?
Thanks,
Mark
2011 Jul 19
3
Suggestions to improve this minimal kickstart config for CentOS 6?
I've come up with the following kickstart config (see below) for
deploying a minimal CentOS 6 VM. It takes about 460MB. I'm assuming that
all of the -firmware RPMs aren't needed for a VM installation, so I
removed them. Also removed as many selinux packages as possible since I
don't need that.
I was wondering whether anyone could offer any further suggestions on
minimizing
2005 Nov 23
2
negative binomial overdispersion question
Hello,
I'm a grad student in the Intelligent Transportation Systems lab at Portland
State Univ. in Portland, OR, USA. I'm trying to learn the basics of R to run a
negative binomial in the near future, and so I ran a test regression on roadway
crash data obtained from "Statistical and Econometric Methods for
Transportation Data Analysis" by Washington et al (p. 250). I ran the
2010 Mar 20
1
basic pc to pc voip in lan
Hey everyone
The question that i am putting up will sound a bit odd as i am a
newbie to asterisk. I have downloaded and install the asterisk and had
a look at some of the configuration files like sip.conf, users.conf
and extensions.conf. Now my question is that I want to do voip with
another pc in LAN, what shall i have to do to implement this and i
guess it will be possible without any hardware
2005 Mar 11
2
Calculating lengths of runs of 0 or 1 sequences in meteorological data
Dear List Members,
I need some help about programming in S language. My
problem is as follows:
I have meteorological data (about rainfall measurement
each day from 1989-2002), say like
http://www.angelfire.com/ab5/get5/data.rainfall.txt
or http://www.angelfire.com/ab5/get5/R.rainfall.txt
in a sequence of 0(denoting dry day)'s and 1(denoting
wet day)'s. I want to construct a frequency
2007 Dec 10
1
Extracting clusters from Data Frame
Hello,
I have a large data frame (1006222 rows), which I subject to a crude
clustering attempt that results in a vector stating whether the datapoint
represented by a row belongs to a cluster or not. Conceptually this looks
something like this:
Value Cluster?
0.01 FALSE
0.03 TRUE
0.04 TRUE
0.05 TRUE
0.07 FALSE
...
What I'm looking for is an efficient strategy to extract all
2005 Dec 06
1
Help on a matrix task
Hello,
Being new to R, I am completely stuck with the following problem. Please
help to find a general solution to the following matrix task:
Given:
N<-4
input_mat<-matrix(c(1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0,
1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0),ncol=N)
2017 Mar 06
3
Re: Compile DLL for Windows
I would like to know if there is a proper documentation for compiling
libvirt for Windows.
This is in regard to the latest versions of libvirt.
Also, most answers are outdated and the scripts by Matthias Bolte on github
don't use the latest versions and patches for libvirt.
Regards,
Kartik Vaishnav
2009 Nov 16
8
extracting the last row of each group in a data frame
Hi,
I would like to extract the last row of each group in a data frame.
The data frame is as follows
Name Value
A 1
A 2
A 3
B 4
B 8
C 2
D 3
I would like to get a data frame as
Name Value
A 3
B 8
C 2
D 3
Thank you for your suggestions in advance
Jeff
2012 Sep 03
1
Time Series filter help?
I have a time series data with 1's and 0's. When the last 3 observations
are 1 I want to generate a 1 until I have three 0's in a row and then I want
it to produce all zeros again. For example if I have 0101010101 for the
first part of the time series this would produce all zeros. Then if the
data has 111 my function will return 1's until I have three 0's in a row and
it
2009 Nov 02
5
Optimizar código
Hola lista, tengo una base de datos muy grande de un datalogger.
Consiste en un vector con 0's y 1's, y tengo que ver cuando hay 600 o
más unos seguidos. Se me ocurrió hacerlo con un loop for. Pero tarda
demasiado. También intente usar which para que seleccione solo los 1
para empezar a sumar pero no hay gran diferencia. A alguien se le
ocurre alguna solución para hacerlo más rápido?
Acá
2015 Jun 17
3
[LLVMdev] Register Allocation on IR
Having worked on SSA register allocators in the past I have to say that SSA is actually a good fit for register allocation. However LLVM IR is indeed not. You don't have any target instructions or register classed/constraints. It wouldn't make much sense to designate registers to llvm IR values nor is there a way to express that in IR. llvm has the machine instruction (MI) representation
2012 Mar 09
1
extracting the i-th row of a matrix in a list of lists
Hi,
what is the proper of of "passing a missing value" so I can extract
the entire i-th row of a matrix (in a list of lists) without
pre-computing the number of cols?
For example, if I know that the matrices have 2 columns, I can do the following:
set.seed(1)
x0 <- lapply(1:10, function(i) replicate(4, list(matrix(rnorm(10), nc=2))))
lapply(lapply(x0, '[[', 3), '[',
2006 Sep 06
4
histogram in the background?
I intend to draw a plot of y against x. In the background of this graph I
wish to creat a histogram of the horizontal variable x. Does any expert know
how to produce such a plot?
[[alternative HTML version deleted]]