0

I am working with a relatively large dataset with a lot of attributes, is there any simple way(no extra packages) to let the output be like this row names as attributes name and col names as the function:

               Min   Max                       
Sepal.Length   4.3   7.9
Sepal.Width    2.0   4.4
Petal.Length   1.0   6.9
Petal.Width    0.1   2.5

Currently, when I sapply multiple functions to the data, the output is this

     Sepal.Length Sepal.Width Petal.Length Petal.Width
min      4.300000    2.000000        1.000    0.100000
max      7.900000    4.400000        6.900    2.500000
mean     5.843333    3.057333        3.758    1.199333

However, this output will be too wide to fit in a pdf when knitting when dealing with large number of attributes.

1 Answer 1

2

you can use the t function

transposed_table <- t(normal_table)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.