Displaying 2 results from an estimated 2 matches for "bocu".
Did you mean:
bock
2010 Mar 16
1
nested looping functions and dataframes
...;-i; c$Location<-j
return(c)
}
Where, x is a dataframe that looks like the following:
> head(x,n=20)
Year Location Species
66 1998 PIPE_7 ACMI2
67 1998 PIPE_7 AMAR2
68 1998 PIPE_7 AMCA6
69 1998 PIPE_7 ANCY
70 1998 PIPE_7 ASVE
71 1998 PIPE_7 BOCU
72 1998 PIPE_7 CIFL
73 1998 PIPE_7 DAPU5
74 1998 PIPE_7 DICHANTHEL
75 1998 PIPE_7 GABO2
76 1998 PIPE_7 HEHE5
77 1998 PIPE_7 LIAS
78 1998 PIPE_7 LIPY
79 1998 PIPE_7 PAVI2
80 1998 PIPE_7 PHPI
81 1998 PIPE_7 PHVI5
82 1998 PIPE_7...
2010 Mar 10
2
function to create multiple matrices
Hi All,
If given a dataframe (long form) with Year, Species, and Location,
How would I write a function that would create a unique matrix of Species &
Location for each Year?
What I've tried doing is the following:
data #dataframe
dataT<-table(data$Species,data$Location,data$Year) #creates tables of
Species vs Location for each Year
But I'm encountering issues individually