search for: data2_1

Displaying 3 results from an estimated 3 matches for "data2_1".

2009 Nov 13
2
why the same values cannot be judged to be the same in R
...t;-matrix(data=c(1,1.22,1.32,1, 1.53, 2.34,1, 1.21, 1.37,1, 1.52, 2.35,2, 0.21, 3.33,2, 0.23, 3.35,3, 1.57, 1.31,3, 1.59, 1.33),nrow=8,ncol=3,byrow=TRUE) data2<-data.frame(data2);names(data2)<-c("areaid","x1","y1") data2$tag<-0 data1_1<-data1[1,] data2_1<-data2[data2$areaid==data1_1$areaid & data2$tag==0,] ran_1<-sample(c(1:length(data2_1)),2, replace = FALSE) data2_1<-data2_1[ran_1,] data_1<-merge(data1_1,data2_1) #data_1 # areaid x y date x1 y1 tag # 1 1 1.2 1.3 3/23/2004 1.52 2.35 0 # 2 1 1.2...
2008 Feb 06
1
error message from apply()
Hi, I keep getting the error message. Please help. Error in colMeans(x, na.rm = TRUE) : 'x' must be an array of at least two dimensions The codes are: data2_1 <- matrix(c(0.9584190, 0.2710325, -0.9495618, -0.1301772, -0.7539687, 0.5344464, -0.8205933, 0.1581723, -0.5351588, 0.04448065, 0.9936430, 0.2278786, -0.8160700, -0.3314779, -0.4047975, 0.1168152, -0.7458182, - 0.2231588, -0.5051651, -0.74871174, 0.9450363, 0.4797723, -0.9033313, - 0.5825065, 0....
2012 Oct 14
6
transforming a .csv file column names as per a particular column rows using R code
...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. Tool_1,Data1_1,Data2_1,Tool_2,Data1_2,Data2_2,Tool_3,Data1_3,Data2_3... so on A,0,1,A,3,1,A,2,1 B,3,2,B,1,2,B,3,2 ...... so on. basically I am transposing entire data based on a specific column row values and renaming the column headers. I have a shell script based on awk which can do this task, but the script is taking...