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 7976287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:52:42+00:00 2026-06-04T08:52:42+00:00

I have a matrix variable in R, say k. I want to write it

  • 0

I have a matrix variable in R, say k. I want to write it out as a file. I use the code like:

write.table(k,file="outfile",sep="\t")

But when I get the file and open it, it contains headers. The first line is like: “v1” “v2” …… “V6000”. And after that, each line starts with the row number like “1”,”2″ and so on. I don’t want headers. Is there a way to do that?

And now I even cannot load the file into R again using read.table("outfile",header=TRUE,sep= "\t"), it’s even not the same as what I previously outputed. R recognised the first colunm in the file which are row numbers as a new column.

  • 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-04T08:52:43+00:00Added an answer on June 4, 2026 at 8:52 am

    To remove row names and column names (header) when outputting a table to a text file, assign FALSE to both row.names and col.names when writing the matrix,

    m <- matrix(1:12, 4 , 3)
    write.table(m, file="outfile,txt", sep="\t", col.names = F, row.names = F)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let’s say I have table/list like this n=3 in this case, but n can
I have a variable dimension matrix, X. I want a function that will get
I have a UDF which returns table variable like -- -- RETURNS @ElementTable TABLE
I have an mXn matrix of integers. I want to write the matrix to
I am looking for a way to have a Matrix variable (i.e, a bunch
I have a matrix A consisting of 200 vectors of size d. I want
I have a matrix mat and would like to calculate the mean of the
Let's say that you have a normally distributed variable y with a 3-group categorical
I have a data set that I use the model.matrix() function on to convert
Let's suppose I have a numpy matrix variable called MATRIX with 3 coordinates: (x,

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.