search for: id_y

Displaying 10 results from an estimated 10 matches for "id_y".

Did you mean: id_
2009 Apr 01
2
Matrix multiplication - code problem
Hi listers, I am having some trouble in a matrix multiplication... I have already checked some posts, but I didn't find my problem... I have the following code... But I am not getting the right multiplication... I checked the dimension and they are fine... id_y <- array(1:10,dim=c(2,1,5)) id_yt<-aperm(id_y,c(2,1,3)) m_id<-array(dim=c(dim(id_y)[1],dim(id_y)[1],dim(id_y)[3])) for (i in 1:dim(id_y)[3]){ m_id[,,i]<-id_y[,,i]%*%id_yt[,,i] } m_id -- View this message in context: http://www.nabble.com/Matrix-multiplication---code-problem-tp2283500...
2018 May 01
2
how can I convert a long to wide matrix?
...set is correct. I took two readings from the "SITE A" within a short time interval, therefore I want to take the first value if there are repeated within a same group of "timeGroup". Therefore I wanted following FinalData1 B1 B2 id_X "A" "B" id_Y "A" "B" thanks, On Tue, May 1, 2018 at 4:05 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi Marna, > I think this is due to having three rows for id_X and only two for > id_Y. The function creates a data frame with enough columns to hold > the grea...
2018 May 01
2
how can I convert a long to wide matrix?
Hi Jim, Thank you very much for your suggestions. I used it but it gave me three sites. But actually I do have only two sites "Id_X" and "Id_y" . In fact "A" is repeated two times for "Id_X". If it is repeated, I would like to take the first one among many repeated values. dat<-structure(list(ID = structure(c(1L, 1L, 1L, 2L, 2L), .Label = c("id_X", "id_Y"), class = "factor"), Ev...
2018 May 01
0
how can I convert a long to wide matrix?
...e "SITE A" within a > short time interval, therefore I want to take the first value if there are > repeated within a same group of "timeGroup". > Therefore I wanted following > > FinalData1 > > B1 B2 > id_X "A" "B" > id_Y "A" "B" > > thanks, > > > > On Tue, May 1, 2018 at 4:05 PM, Jim Lemon <drjimlemon at gmail.com> wrote: >> >> Hi Marna, >> I think this is due to having three rows for id_X and only two for >> id_Y. The function creates a data f...
2018 May 01
0
how can I convert a long to wide matrix?
Hi Marna, I think this is due to having three rows for id_X and only two for id_Y. The function creates a data frame with enough columns to hold the greatest number of values for each ID variable. Notice that the SITE_n columns contain three values for id_X (A, A, B) and two for id_Y (A, B, NA) as there was no third occasion of measurement for the latter. Even though there are o...
2018 May 01
2
how can I convert a long to wide matrix?
Hi R user, I was trying to convert a long matrix to wide? I have an example and would like to get a table (FinalData1): FinalData1 B1 B2 id_X "A" "B" id_Y "A" "B" but I got the following table using the following code. FinalData1 B1 B2 id_X "A" "A" id_Y "A" "B" the code and the example data I used are given below. Is there any suggestions to fix the problem? dat<-struct...
2018 May 01
0
how can I convert a long to wide matrix?
...18 at 8:24 AM, Marna Wagley <marna.wagley at gmail.com> wrote: > Hi R user, > I was trying to convert a long matrix to wide? I have an example and would > like to get a table (FinalData1): > > > FinalData1 > B1 B2 > id_X "A" "B" > id_Y "A" "B" > > but I got the following table using the following code. > > FinalData1 > > B1 B2 > > id_X "A" "A" > > id_Y "A" "B" > > > the code and the example data I used are given below. Is...
2013 Mar 04
1
Mysterious issues with reading text files from R in ArcGIS and Excel
...  FALSE 2 F07001 1481274 6619628 2007-03-05 12:00:41  657.1029  657.1029    FALSE   FALSE 3 F07001 1481279 6619630 2007-03-05 14:01:12  660.3569  660.3569    FALSE   FALSE 4 F07001 1481271 6619700 2007-03-05 16:00:39  620.1397  620.1397    FALSE   FALSE  in ArcGIS now looks like this: Field1idid_Xid_YxydateR1dmedR1dmean R1errorR2errorOBJECTID * 1F07001118.0818119.485541e+01514824456621768NA2498.297272498.29727FALSEFALSE1 2F07001118.0818119.485541e+01514812746619628NA657.102922657.102922FALSEFALSE2 3F07001118.0818119.485541e+01514812796619630NA660.356911660.356911FALSEFALSE3  4F07001118.0818119.4...
2013 Mar 05
1
R-help Digest, Vol 121, Issue 5
...628 2007-03-05 12:00:41 657.1029 657.1029 FALSE FALSE > 3 F07001 1481279 6619630 2007-03-05 14:01:12 660.3569 660.3569 FALSE FALSE > 4 F07001 1481271 6619700 2007-03-05 16:00:39 620.1397 620.1397 FALSE FALSE > > in ArcGIS now looks like this: > > Field1idid_Xid_YxydateR1dmedR1dmean R1errorR2errorOBJECTID * > 1F07001118.0818119.485541e+01514824456621768NA2498.297272498.29727FALSEFALSE1 > 2F07001118.0818119.485541e+01514812746619628NA657.102922657.102922FALSEFALSE2 > 3F07001118.0818119.485541e+01514812796619630NA660.356911660.356911FALSEFALSE3 > 4...
2011 Feb 24
2
create dummy variables by for loop
HI, Dear R community, I try to create 100 dummy variables like the following: ack$id_1 <- (ack$ID==1)*1 ack$id_2 <- (ack$ID==2)*1 .. . ack$id_100 <- (ack$ID==100)*1 I used the following codes: for(i in 1:100){ ack$id_[i] <- (ack$ID==i)*1 } But only one column is created, can anyone help me? Thanks a lot! -- Sincerely, Changbin --