the meanig of R script "%*%"
When working with R, i dont understant "%*%" code. For example,
------------- data <- read.table(input_f, header=TRUE, row.names=1, sep="\t", quote="") data.pca <- prcomp(t(data)) data.pca.sample <- t(data) %*% data.pca$rotation[,1:2] -------------
I want to get PCA by R script including the coding above.
Please advice me.
• 1,302 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Hello tekitekitoto!
We believe that this post does not fit the main topic of this site.
This is an R usage, not a bioinformatics-specific question, better suited to other forums. In addition the answer can be found by reading R documentation.
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!
Hello Neiflws
Thank you for pointing. I'm beginner about bioinformatics and this forums.
I would like to ask that question in other forums.
Thank you so much!!
Quick hint:
%*%is the scalar product, therefore the line in question does the projection of the input data on the first 2 principal components.