[R] converting a row of a data.frame to a vector"

z3025589 at student.unsw.edu.au z3025589 at student.unsw.edu.au
Tue Oct 21 04:42:19 CEST 2008


Try:

as.vect = function(x)

{
	t1 = as.matrix(x)
	t2 = aperm(t1)
	t3 = as.vector(t2)

	return(t3)
}

This function converts entire dataframe into a vector.


Alexander Pui
PhD Candidate in Hydroclimatology, 
University of New South Wales
Email: a.pui at student.unsw.edu.au



More information about the R-help mailing list