Dear list members,

I have a question regarding too subsetting a data set in R.

I created an object for my data:

 >pa = read.csv("espec_indic.csv", header = T, sep=",", check.names = F)

 > levels(pa$influencia)
[1] "AID" "AII" "AP"

The object has 3 levels for influencia (AP, AID, AII)

Now I subset only observations with influencia = "AID"

 >pa2 = subset(pa, influencia=="AID")

but if I ask for the levels of influencia still show me the 3 levels, 
AP, AID, AII.

 > levels(pa2$influencia)
[1] "AID" "AII" "AP"

Why is that?

I was thinking that I was creating a new data frame with only AID as a 
level for influencia.

How can I make a complete new object with only the observations for 
"AID" and that the only level for influencia is indeed "AID"?

Best,

Manuel




-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspinola@una.ac.cr
mspinola10@gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río 
<https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>

	[[alternative HTML version deleted]]

