Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8123153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:04:49+00:00 2026-06-06T06:04:49+00:00

I am interested to know what a proper x (vector matrix or data frame)

  • 0

I am interested to know what a proper x (vector matrix or data frame) input looks like. I am currently using the function in two different sorts of matrices. However, I am not sure how R would interpret my data the way I intend. I will explain the types of matrix by example.

Type 1

           Gene1 Gene2 Gene3
    sample1
    sample2

Type 2

          Sample1 Sample2 Sample3
gene 1
gene 2
gene 3

Are either of these formats valid x parameters? I input both of types of matrices and get some results, but without knowing whether or not this a proper use the function, these are just random numbers. Thank you for your time. I apologize that this isn’t more interesting.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T06:04:54+00:00Added an answer on June 6, 2026 at 6:04 am

    When X is a matrix, cor(X) will produce a square correlation matrix with the number of rows and columns equal to the number of columns in the original matrix. In other words, cor produces correlations between the columns in the matrix. Here is a simple example:

    > x <- rnorm(5)
    > y <- rnorm(5)
    > cbind(x,y)
                x        y
    [1,]  1.67287  1.70663
    [2,] -1.23120  0.56948
    [3,]  0.67538 -0.20596
    [4,] -1.21077  0.11648
    [5,]  0.60409  1.15405
    
    > cor(cbind(x,y))
            x       y
    x 1.00000 0.56329
    y 0.56329 1.00000
    

    Does that answer your question?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a two-part question: First, I am interested to know what the best
I am interested into getting into bash scripting and would like to know how
I am interested to know on how I can resize the view when using
I am really interested to know that, Is it possible that using try ...
I am interested to know how the DNS requests to political sites differ in
Question: I'm interested to know the best practice for killing a long standing operation
I am interested to know how an URL-based api key restriction works, such as
I was interested to know about parameters other than space and time during analysing
My last question was somewhat narrower than this one. I am interested to know
I know this is largely an opinion, but I'm interested if you have one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.