Hi Kátia,

try this:

datos <- read.table("clipboard", header=TRUE) # read in your data

apply(datos[,4:7],2,function(f) sapply(f, function(x)datos$SP.focal[x]))


Cheers,

Marcelino

At 01:23 11/11/2010, Kátia Emidio wrote:
>Hi there,
>I'll appreciate some help to my analysis.
>I have 4K nearest neighbours of focal trees that are represented by the ID
>number. I'd like to replace the ID_numbers in the Ks into DAP, using the
>"ID.sp.fcal" column that are the same in the table.
>Thanks
>
>--
>Kátia Emídio da Silva DSc
>Eng. Florestal
>Pesquisador
>Embrapa Amazônia Ocidental
>
>Forestry Engineer
>Researcher at Brazilian Agricultural Research Corporation
>  Embrapa western Amazon
>Manaus/AM-Brazil
>
>Content-Type: text/plain; charset=US-ASCII; name="merge_DAP.help.txt"
>Content-Disposition: attachment; filename="merge_DAP.help.txt"
>X-Attachment-Id: f_ggcwa2m40
>
>_______________________________________________
>R-sig-ecology mailing list
>R-sig-ecology@r-project.org
>https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

____________________________________

Marcelino de la Cruz Rot
Depto. Biologia Vegetal
EUIT Agricola
Universidad Politecnica de Madrid

tel: 34 + 913365435
____________________________________  
	[[alternative HTML version deleted]]

