Displaying 8 results from an estimated 8 matches for "sample_id".
2012 May 21
1
help with melt/cast in reshape-package
...Here's the complete post:
Hi everyone,
>
> Since it's quite a while that I used the reshape package, I now feel kind
> of rusty.
>
> I have a data.frame like this:
>
>
>
> id Sample.Name Marker Allele.1
> Allele.2 sample_id species
> 1 01_primer01 Dalb01 165
> 179 SH233 D. madagascariensis
> 2 01_primer04 Dalb04 221
> 225 SH233 D. madagascariensis
>...
2009 Oct 23
5
Change positions of columns in data frame
....
I've added some new vectors as columns in a data frame using cbind(). As they're all put as the last columns inte the data frame, I would like to move them to specific positions. How do you do to change the position of a column in a data frame?
I know I can use fieldTrial0809=data.frame(Sample_ID=as.factor(fieldTrial0809$Sample_ID), Plant_ID=as.factor(fieldTrial0809$Plant_ID), ...) to create a new data frame with the given columns in the specified order, but there must be an easier way..?
All the best,
Joel
_________________________________________________________________
Nya...
2009 Jul 29
3
how to skip a numeric column for averaging other columns?
...d the first column for sample
name. I want to take "Log" for all data, but how to compute without the
first column for sample name.
That is,
column 1: sample ID
column 2-10: data
I want to find an average on each column (2-10)
> apply(raw_data,2,mean)
Error in Math.data.frame(list(sample_id = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, :
non-numeric variable in data frame: sample_id
Thank you in advance,
Jin
--
View this message in context: http://www.nabble.com/how-to-skip-a-numeric-column-for-averaging-other-columns--tp24723210p24723210.html
Sent from the R help mailing list archive at Nab...
2012 May 23
0
data conversion (possibly with reshape package)
Hi everyone,
I have an issue with a data conversion. First, I tried it with the
reshape-package, but since it's quite a while that I used it, I feel kind
of rusty...
I have a data.frame like this:
id Sample.Name Marker Allele.1
Allele.2 sample_id species
1 01_primer01 Dalb01 165
179 SH233 D. madagascariensis
2 01_primer04 Dalb04 221
225 SH233 D. madagascariensis
3 01_primer08...
2006 Dec 31
4
Does SQL group by have a heavy duty equivalent in R
...dure twice or thrice (kind of an
internal control).
So obviously I need to find those replications, and confirm that the results
are the same. If there is discordance then I need to address it.
I tried to use the aggregate function
nr.attempts
<-aggregate(RawSeq$GENOTYPE_ID,list(sample=RawSeq$SAMPLE_ID,assay=RawSeq$ASSAY_ID),length)
This was simply to figure out how many times the same piece of information
had been obtained. I ran out of patience. It took beyond forever and tapply
did not perform much better. The reshape package did not help - it implied
one was out of luck if the data was not nu...
2008 Mar 19
2
problem with worker status
...perfect for me and seems to be working well most of
the time but some times I have the following problem:
My worker is set up like this:
class UploadWorker < BackgrounDRb::MetaWorker
set_worker_name :upload_worker
set_no_auto_load(true)
def create(args = nil )
file = args[:file]
sample_id = args[:sample_id]
@user_id = args[:user_id]
@submission_time = Time.now
percent_complete = 0
total_count = get_total_count(file)
register_status(:percent_complete => percent_complete, :total =>
total_count)
<<< some long running task >>>
exi...
2010 Sep 14
3
how to compute when row length is different
hi guys..please help me with this
i am working on two data frames
one goes like this:
DF1
Sample_id RepairHours Denatured Dose ZeroMean FourtyFiveMean NinetyMean
1 SDM071 0 1 B 60.5 19.0 45.0
2 SDM071 1 1 B 46.0 23.0 42.5
3 SDM071 2 1 B 52.5 24.0 40.0
4 SDM071...
2009 May 01
0
Apologies: example of data needing zeros-no NA values
...er's error of not giving an example of the data. There actually are no NA values, so I'm not simply replacing values in the data frame. So, the number of species (and therefore abundance values) listed in each treatment differs, even though they all have the same number of plots sampled.
Sample_ID Spec_num Species_ID Abundance Treatment
1 1 SOLCAN 0.05 1
2 1 SOLCAN 1.5 1
3 1 SOLCAN 2.1 2
4 1 SOLCAN 3.2 2
5 2 ERISTR 2.4 1
6 2 ERISTR 3.1 1
7 2 ERISTR 5.6 1
8 2 ERISTR 6.3 1
9 2 ERISTR 2 1
10 2 ERISTR 3 2
11 2 ERISTR...