I have some output from a tapply call that looks like
1 2 4
678.2 19.3 716.2
and I want to make it into a data frame that looks like
key value
1 1 678.2
2 2 19.3
3 4 716.2
how can I do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Some example code would be nice, to see exactly what you’re doing. To answer your question narrowly, if
xis the result of yourtapply, thenMore broadly, see
?byand?aggregate, and also packageplyrfor more general data-wrangling needs.