Re: [R] Doing dist on separate objects in a text file

2011-11-07 Thread jim holtman
Is this what you want: > x <- read.table(textConnection('"Label" "X" "Y" "Slice" + 1 "Field_1_R3D_D3D_PRJ_w617.tif" 348 506 1 + 2 "Field_1_R3D_D3D_PRJ_w617.tif" 359 505 1 + 3 "Field_1_R3D_D3D_PRJ_w617.tif" 356 524 1 + 4 "Field_1_R3D_D3D_PRJ_w617.tif"

Re: [R] Doing dist on separate objects in a text file

2011-11-06 Thread ScottDaniel
> > On Nov 5, 2011, at 7:20 PM, ScottDaniel wrote: > > > So I have a text file that looks like this: > > "Label" "X" "Y" "Slice" > > 1 "Field_1_R3D_D3D_PRJ_w617.tif" 348 506 1 > > 2 "Field_1_R3D_D3D_PRJ_w617.tif" 359 505 1 > > 3 "Field_1_R3D_D3D_PRJ_w617.tif" 35

Re: [R] Doing dist on separate objects in a text file

2011-11-06 Thread David Winsemius
On Nov 5, 2011, at 7:20 PM, ScottDaniel wrote: So I have a text file that looks like this: "Label" "X" "Y" "Slice" 1 "Field_1_R3D_D3D_PRJ_w617.tif"348 506 1 2 "Field_1_R3D_D3D_PRJ_w617.tif"359 505 1 3 "Field_1_R3D_D3D_PRJ_w617.

Re: [R] Doing dist on separate objects in a text file

2011-11-05 Thread R. Michael Weylandt
Perhaps split() directly or more abstractly tapply() from base or one of the d_ply() from plyr? Michael On Sat, Nov 5, 2011 at 7:20 PM, ScottDaniel wrote: > So I have a text file that looks like this: >        "Label" "X"     "Y"     "Slice" > 1       "Field_1_R3D_D3D_PRJ_w617.tif"  348     506