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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:49:14+00:00 2026-06-14T07:49:14+00:00

I had posted before a question related to this, but the solutions didn´t solve

  • 0

I had posted before a question related to this, but the solutions didn´t solve completely my problem.

I have a table that contains the characters “‘”, and “#” and when I read it using read.table() to read it and it cannot skip the rows that contain those characters.

I am reading the file using the command:

table<- read.table("table.txt",header =TRUE, sep ="\t",quote="'",skip=8,fill=TRUE, comment.char="#",check.names=F)

This is only reading the first column of the table and not the entire table like it was supposed to do, any suggestions how to solve this?
enter image description here

An example line of the table containing # is:

Homo sapiens    Unigene Hs.549823   ILMN_110080 HS.549823   Hs.549823       Hs.549823       5053715 AI732602            ILMN_1846799    5910129 S   320 GCAGGTTGTTATTGTTGCTGAGCGGGGTGTGTGGGTGGCTAACGAGAGGG  11  +   61276241-61276290       zo26g12.x5 Stratagene colon (#937204) Homo sapiens cDNA clone IMAGE:588070 3, mRNA sequence
  • 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-14T07:49:15+00:00Added an answer on June 14, 2026 at 7:49 am

    Try using readLines() instead to get the raw lines, then splice them according to your delimiter

    library(stringr)
    
    # Open Connection to file
    pathToFile <- path.expand("~/path/to/file/myfile.txt")
    f <- file(pathToFile, "rb")  
    
    # Read in lines
    rawText <- readLines(f)
    
    problemFreeTable <- 
      sapply(rawText, str_split, "\t")  # replace "\t" with "," or the appropriate delim. 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have posted on this topic before, but as yet I have not had
I had posted a question in regards to this code. I found that JTextArea
I posted this question on the django-users list, but haven't had a reply there
This question is related to another question that I posted on SO earlier How
I had posted this earlier on Stack Overflow, but couldn't get a positive result.
I posted another one on this,, but i had to edit it really much...
had posted the question before concerning counting; am looking for a way of how
Before the question, let me preface this with the fact that I am working
I know this question is like one posed before, but I need a good
When I first posted this question I had strong coupling between my web service

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.