How to calculate the tumor purity from RNA-seq data?

Hello, I want to calculate the tumour purity using RNA-seq data (TPM normalized matrix data).
I preferably want to use the estimate package, but there is no clear guide for how to use this packge, how do I enter my matrix?
This is the package webiste: ESTIMATE: R Package

I really need help with this, what is the code for using it?

Thanks!

Anyone?
Any help would be realy appreciated!

The package has a vignette, that you should see at that link or by running:

vignette("ESTIMATE_Vignette", package = "estimate")

You should also get a list of the available functions by typing

?estimate

or

library(help="estimate")

Then you can use the above links or ?function_name to get more detailed documentation on each function.