Displaying 20 results from an estimated 2000 matches similar to: "Matrix Another table"
2012 Apr 06
4
Order sapply
Good Afternoon,
I have the following code, but it seems that something must be doing
wrong, because it is giving the results I want.
The idea is to create segments while the value of Commutation is less than
1000.
for example, from the small set of data below
text="
val_user pos v v_star v_end commutation v_source
v_destine
1 1 96-96 1173438391 1173438391 0
2012 Mar 30
3
Adding text for written comments to bottom of graphs
Hello All,
Recently developed the code below for graphing patterns of chemotherapy administration. As someone just starting to use R in their work, I managed to figure out some parts of the code but needed help with others.
setwd("N:/Regimen Coding/0906/Plots Test")
getwd()
TestData <- structure(list(profile_key = c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2,
2, 3, 3, 3, 3, 3), line = c(1, 1,
2011 Dec 18
1
Identifying records with the correct number of repeated measures
Dear list,
I have a dataset where we sampled multiple individuals either 1 or 9
times. Our measurement variable is 'Delta13C' (see below sample
dataset). I cannot figure out how to efficiently use a vector command
(preferably) or a loop to create a new vector of the names of the
individuals sampled 9 times. Note that the 'FeatherPosition' variable
will only be "P1" for
2012 May 31
3
How can I get this function to work?
Hello All,
Can anyone tell help me understand why the function below doesn't work and how I can fix it? Below are some sample data, some code that works on individual rows of the data, and my attempt to translate that code into a function. My hope is to get the function working and then to apply it to the larger data frame using ddply() from the plyr package or possibly some other approach.
2010 Mar 26
4
Creating a vector of categories
Hi,
I have a column in a data frame looking something like:
$sex $language $count
male english 0
male english 0
female english 32
male spanish 154
female english 11
female norweigan 7
and so on.
What I want to do is to order these in to categories, for instance one
category where count>=0 & count<10 and so on..
I want my data to turn out looking something like:
male
2011 Oct 05
2
A question about R image function
Dear folks,
I have a question about the image() function in R. I found the following
link talking about this
but the replies didn't help with my situations.
http://r.789695.n4.nabble.com/question-on-image-function-td839275.html#a839276
To be simple, I will keep using the example in the above link.
Suppose the data are like
x y mcpvalue
0.4603578
2005 May 05
6
Need some quick help with lattice - barchart
For the following code below, the x-axis ticks are 1,2,3,4,5,6,7 when I was expection them to be 1,2,8,9,10,11,12. Please help me figure out where is the mistake.
library(lattice)
testdata <- as.data.frame(t(structure(c(
1,2005,9.24,6.18,634,
2,2005,8.65,6.05,96,
8,2004,6.81,6.51,16,
9,2004,9.0,7.29,8,
10,2004,8.84,6.18,524,
11,2004,8.54,6.35,579,
12,2004,9.97,6.3,614,
12,2005,8.75,5.84,32,
2015 Aug 05
1
Samba4 not able to write to group writeable folder???
Hi...
With samba4 I sometimes feel like a bloody beginner even I use samba
since ages.
Miracle of the day: Users connecting using samba4 cannot write to group
writeable folders even they should be able to.
I upgraded one 3.6 fileserver to 4.2.3. PDC is always a samba 4.2.3
instance. I am using samba4 in classic PDC mode for a couple of reasons.
On my fileserver I have a folder called
2005 Apr 21
3
Need help with R date handling and barchart with errorbars
Hi All..
Have a question.. For the following r code
testdata <- as.data.frame(t(structure(c(
"1/1/04","LV1",3.8,2,87,
"2/1/04","LV1",3.2,3,28,
"3/1/04","LV1",3.4,3,88,
"4/1/04","LV1",3,2,26,
"5/1/04","LV1",3.8,2,87,
"6/1/04","LV1",3.2,3,28,
2007 May 13
2
extracting text contained in brackets ("[ ... ]") from a character string?
I have a text string that contains text within two brackets.
e.g. "testdata[3]" "testdata[-4]", "testdata[-4g]",
I wish to "extract" the string enclosed in brackets?
What is a good way to do this?
e.g.
fun(testdata[3]) = '3'
fun(testdata[-4g]) = '-4g'
---------------------------------
Moody friends. Drama queens. Your life?
2012 Mar 20
2
Reshaping data from long to wide without a "timevar"
Hello All,
I was wondering if it's possible to reshape data from long to wide in R without using a "timevar". I've pasted some sample data below along with some code. The data are sorted by Subject and Drug. I want to transpose the Drug variable into multiple columns in alphabetical order.
My data have a variable called "RowNo" that functions almost like a
2003 Sep 23
2
confusion about what to expect?
In playing around with data.frames (and wanting a simple, cheap way to
use the variable and case names in plots; but I've solved that with
some hacks, yech), I noticed the following behavior with subsetting.
testdata <- data.frame(matrix(1:20,nrow=4,ncol=5))
names(testdata) ## expect labels, get them
names(testdata[2,]) ## expect labels, get them
names(testdata[,2]) ## expect labels, but
2012 Jun 25
4
graph displays
Good Afternoon, I'm trying to create a graph that displays the best way the
following information.
??? For instance organized by bar graph, A, B, C
Source X1000s X600s X500s X250s X100s X50s X10s X5s X3s X1s
1 A 47 63 75 116 125 129 131 131 131 131
2 B 37 64 45 11 25 19 61 131 186 186
3 C 17 62 25 66 12 29 91 171 186
2009 Mar 06
2
Interaction term not significant when using glm???
Dear all,
I have a dataset where the interaction is more than obvious, but I was asked
to give a p-value, so I ran a logistic regression using glm. Very funny, in
the outcome the interaction term is NOT significant, although that's
completely counterintuitive. There are 3 variables : spot (binary response),
constr (gene construct) and vernalized (growth conditions). Only for the FLC
construct
2010 Feb 12
2
Access dataframe with variable name in function
Sorry guys, but I have another one:
I want to write a function that returns a certain column of a
dataframe. The function accepts two argument: the dataframe and the
name of the column, but the column is not given as a "string" but as
a variable name.
EXAMPLE
----------------------
> testdata
start stop censor groupvar var1 var2
1 0 1 0 1
2010 Aug 13
1
Bug in t.test?
Hello all,
due to unexplained differences between statistical results from
collaborators and our lab that arose in the same large proteomics
dataset we reevaluated the t.test() function. Here, we found a weird
behaviour that is also reproducible in the following small test
dataset:
Suppose, we have two vectors with numbers and some missing values
that refer to the same individuals and that
2005 Apr 22
1
Need help arranging the plot in different fashion than the default format
I want to change the way the plot is appearing in the barchart ..
testdata <-
2010 Mar 12
1
Length as fun.aggregate in cast function of reshape package: unexpected error
Dear Everyone,
I am having problems with use of the reshape package's cast function using length as an aggregating function.
Unexpectedly, I receive the error: 2 arguments passed to 'length' which requires 1
I don't understand this at all - the data I'm using is very simple, and appears almost identical to that used in the
ChickWeight example in the package. The problem can
2007 Sep 20
1
Bug with Cor(..., method='spearman") and by() (PR#9921)
I posted this on R help, and a few others responded indicating they too
were able to replicate the error as a function of missing data. I
believe this should not be the case and hence and reporting it here.
### Code provided on R-Help by Ivar Herfindal
# Simulate data
testdata <- cbind.data.frame(gr=3Drep(letters[1:4], each=3D5), =
aa=3Drnorm(20),
bb=3Drnorm(20))
# Introduce some missingness
2005 Feb 16
2
problem with se.contrast()
I am having trouble getting standard errors for contrasts using se.contrast() in
what appears to be a simple case to me. The following test example illustrates
my problem:
Lab <- factor(rep(c("1","2","3"),each=12))
Material <- factor(rep(c("A","B","C","D"),each=3,times=3))
Measurement <-