search for: dat4

Displaying 20 results from an estimated 42 matches for "dat4".

Did you mean: dat
2012 Oct 14
6
transforming a .csv file column names as per a particular column rows using R code
Hello all, I have a .csv file like below. Tool,Step_Number,Data1,Data2... etc up to 100 columns. A,1,0,1 A,2,3,1 A,3,2,1 . . B,1,3,2 B,2,1,2 B,3,3,2 . . ...... so on upto 50 rows where the column "*Tool*" has distinct steps in second column "*Step_Number*",but both have same entries in Step_Number column. I want the output like below.
2012 Sep 01
5
R_closest date
Hi, I have encountered an issue about finding a date closest to another date So this is how the data frame looks like: PT_ID IDX_DT OBS_DATE DAYS_DIFF OBS_VALUE CATEGORY 13 4549 2002-08-21 2002-08-20 -1 183 2 14 4549 2002-08-21 2002-11-14 85 91 1 15 4549 2002-08-21 2003-02-18 181 89 1 16 4549 2002-08-21 2003-05-15
2010 Nov 16
1
AOV/LME
...ng a little trouble with working out what formula is better to use for a repeated measures two way anova. I have two factors, L (five levels) and T (two levels). L and T are both crossed factors (all participants do all combinations). So, I do: summary(aov(dat~L*T+Error(participant/(L*T)),data=dat4)) But get different results with: anova(lme(dat~L*T,random=~1|participant,data=dat4)). Rather, the lme results are the same as those with the formula summary(aov(dat~L*T+Error(participant),data=dat4)) I know most people advocate the use of lme rather than aov, but I think I need to inclu...
2012 Mar 10
3
function input as variable name (deparse/quote/paste) ??
Hi all Say I have a function: myname=function(dat,x=5,y=6){ res<<-x+y-dat } for various input such as myname(dat1) myname(dat2) myname(dat3) myname(dat4) myname(dat5) how should I modify the 'res' line, to have new informative variable name correspondingly, such as dat1.res dat2.res dat3.res dat4.res dat5.res stored in the workspace. This is only an example of a complex function I have written. Thanks in advance! Casper -- View th...
2012 Jul 24
5
First value in a row
Hi. This is likely a trivial problem but have not found a solution. Imagine the following dataframe: Lat Lon x1 x2 x3 01 10 NA NA .1 01 11 NA .2 .3 01 12 .4 .5 .6 I want to generate another column that consist of the first value in each row from columns x1 to x3. That is NewColumn .1 .2 .4 Any input greatly appreciated, Thanks, Camilo Camilo Mora, Ph.D.
2010 Nov 18
1
lme Random Effects and Covariates
1. I'm attempting to test for Random Effects. I've grouped the data on subject (grid) but want to use lme to build the model without subject as a RE then add it and do anova between the 2 models. This is the result I get and it appears it's adding Random Effects. tmp.dat4 <- groupedData(Trials ~ 1 | grid, data = tmp.dat4) mod2a <- lme(Trials ~ factor(group_id) + reversal, data = tmp.dat4, na.action = na.omit, method = "REML") > summary(mod2a) Linear mixed-effects model fit by REML Data: tmp.dat4 AIC BIC logLik 4544.054 4587.71...
2011 Jul 02
5
How many times occurs
...also tried other thinks but also the same results: *dat<-read.table('input1.txt')* ** ** *dat1 <- dat[ dat[,1]=8 & dat[,2]=9 & dat[,3]=2 ,]=1* *dat2<-dat[(dat[,2]= 8 & dat[,3]=9 & dat[,4]=2),]=1* *dat3<-dat[(dat[,5]=8 & dat[,4]=9 & dat[,5]=2),]=1* *dat4<-dat[(dat[,4]=8 & dat[,5]=9 & dat[,6]=2),]=1* *dat5<-dat[(dat[,5]=8 & dat[,6]=9 & dat[,7]=2),]=1* *dat6<-dat[(dat[,6]=8 & dat[,7]=9 & dat[,8]=2),6]=1* *dat7<-dat[(dat[,7]=8 & dat[,8]=9 & dat[,9]=2),7]=1* *dat8<-dat[(dat[,8]=8 & dat[,...
2012 Jul 29
1
readRDS, In as.double.xts(fishReport$count) : NAs introduced by coercion
Hello, I looked in the R-help but could not find an archive addressing the following. I would like to convert a character to numeric after reading a file with RDS extension. After using as.numeric, I checked if it is numeric. It was not converted. Please help. Here is my code >Report <- readRDS(file="RDS/Report.RDS") > Report[1:2,] dive_id date
2013 Apr 08
3
Reshaping a table
Hello all, I have data in the form of a table: X Y1 Y2 0.1 3 2 0.2 2 1 And I would like to transform in the form: X Y 0.1 Y1 0.1 Y1 0.1 Y1 0.1 Y2 0.1 Y2 0.2 Y1 0.2 Y1 0.2 Y2 Any ideas how? Thanks in advance, IOanna [[alternative HTML version deleted]]
2012 Jul 14
2
Arrange two columns into a five variable dataframe
Hi, I hope that folks can give me some simple approaches to taking the data set below, which is accumulated in two columns called "long" and "group", then arrange the data is the "long" column into a data frame containing five variables: "Group 1", "Group 2", "Group 3", "Group 4", and "Group 5". I am hoping for a few
2012 Oct 12
3
Columns and rows
Hi, Could you please advice some easy way to do the following for a dataframe (header=F) having unequal column- & row- length. 1. Combine/stack/join contents from - a) multiple rows into one column. b) multiple columns into one row. 2. Stack contents from multiple columns (or, rows) into one column (or, row). Thank you. Cheers, Santana [[alternative HTML
2013 Jan 05
3
Need help with time series data
Dear R users, Could you share your knowledge on following problem: Suppose we have dataframe: ID TIME Data1 Data2 Data3 ........... Data700 1. 2013-01-01 00:00:00 34 53 66 ............ 55 2. 2013-01-01 00:00:01 333 4 5 ............ 50 3. 2013-01-01 00:00:02 and so
2013 Sep 09
0
Duplicated genes
...pply(lst1,function(x) {x1<- sum(apply(x[,6:32],2,function(y) y[1]>=y[2]));x2<- sum(apply(x[,6:32],2, function(y) y[1]<=y[2])); if(x1>x2) x[1,] else x[2,] } ),unique(dat2$gene)) #assuming that there are not more than 2 copies of a particular gene. (In the dataset, it was not present) ?dat4<-rbind(dat1New,dat3) dat5<-dat4[order(as.numeric(row.names(dat4))),] ?dim(dat5) #[1] 639? 32 A.K. ________________________________ From: Vivek Das <vd4mmind at gmail.com> To: arun <smartpink111 at yahoo.com> Sent: Monday, September 9, 2013 2:30 PM Subject: Re: Duplicated genes...
2012 Sep 24
3
List creation based on matrix
Hi guys, It would be great if you could help me with this one... I'm looking to create a script to convert a matrix of species abundance e.g: <http://r.789695.n4.nabble.com/file/n4643978/species_matrix.jpg> into two vectors e.g: <http://r.789695.n4.nabble.com/file/n4643978/communitylist.jpg> ---------------- If you feel there is no easy answer to this and that it would be
2012 Dec 17
3
Merge more than 2 dataframe
Hello. I have for example 4 or more dataframe which like such this example: date value 2006-11 0.4577647 2006-12 NaN 2006-10 0.1577647 2006-11 0.3577647 2006-12 NaN 2007-01 NaN 2007-02 NaN 2007-03 0.2956429 2007-01 0.3677647 2007-02 NaN They have the same length. I need merge by date undefined number of dataframes. End result output will look like
2012 Oct 19
4
Creating a new by variable in a dataframe
Hello, I have a dataframe w/ 3 variables of interest: transaction,date(tdate) & time(event_tim). How could I create a 4th variable (last_trans) that would flag the last transaction of the day for each day? In SAS I use: proc sort data=all6; by tdate event_tim; run; /*Create last transaction flag per day*/ data all6; set all6; by tdate event_tim; last_trans=last.tdate; Thanks
2012 Oct 26
3
Delete row if two values in a matrix are equal
Hi all and thank you for your time. I would like to delete rows from this matrix I call "var" if the character in Ref_Allele is equal to the character in Var_Allele. I have attached a before and after, to help my poor explanation. If someone could provide me with some code, or some guidance I would really appreciate it. Thank you again. "Before" > var Ref_Pos Ref_Allele
2012 Jun 06
1
error calling Winbugs using R2WinBugs to run a multi-level model
...er of data rows in each column (I even tried just one). The model loops over the path of each animal, estimating a hidden movement state and their parameters. For 4 individuals with 100 data points each the data looks something like this: dat1 : num 100 dat2 : int 4 dat3 : num [1:4] 8 4 2 5 dat4 : num [1:100, 1:4] 1 1 1 1 1 2 2 2 2 2 ... dat5 : num [1:100, 1:4] 2 2 2 2 2 1 2 2 2 2 ... dat6 : num [1:100, 1:4] 16 34.3 33.5 27.9 14.9 ... dat7 : num [1:100, 1:4] 0.357 0.474 0.487 0.495 0.524 ... dat8 : num [1:50, 1:4] 36.4 294.5 24.4 21.1 422.8 ... This is how I've called WinBu...
2012 Jul 14
2
Help for Fisher's exact test
Hi, R-help, I have a group of data from RNA-seq want to be analyzed by Fisher's exact test in R. I want to compare the significant difference of about 30,0000 individuals in two different samples, and I have no idea how to use R, so could you please give me some suggestions or the scripts for Fisher's exact test? Thank you very much. Best, Guanfeng Wang [[alternative HTML version
2012 Oct 26
3
regression analysis in R
Dear useRs, i have vectors of about 27 descriptors, each having 703 elements. what i want to do is the following 1. i want to do regression analysis of these 27 vectors individually, against a dependent vector, say B, having same number of elements.2. i would like to know best 10 regression results, if i do regression analysis of dependent vector against the random combination of any 4