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

  • Home
  • SEARCH
  • 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 8477593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:30:40+00:00 2026-06-10T18:30:40+00:00

When I parse web sites in R, (system: R+debian) the html object output in

  • 0

When I parse web sites in R, (system: R+debian) the html object output in the console make me uncomfortable.

The gap is wide between lines. How can I make it normal, to narrow the gap between the lines?

Maybe you can see tha same output with the following code.

options(encoding="gbk")
library(XML)
baseURL <- "http://www.jb51.net/article/27174.htm"
txt <- readLines(baseURL)
txt

enter image description here

  • 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-10T18:30:41+00:00Added an answer on June 10, 2026 at 6:30 pm

    Interesting, it seems that when print-ing a vector, the longest element decides how all elements will be spaced.

    Your longest string is txt[374]: on my screen, it takes 19 lines; that means every element of txt will be printed using 19 lines, with possibly a lot of white space.

    You don’t have that problem when printing a list, so a solution is to do:

    print(as.list(txt))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a web scraper that will parse a web-page of publications
Can anyone explain a parse error like this one: Method 'get_EnableCdn' in type 'System.Web.UI.ScriptManager'
I need a web sites some data which I want to parse via jquery.
In my android application, when I try to parse the spotify web api, the
I have a ReSTful web service which needs to parse locale-sensitive data from the
Is it possible to parse XML retrieved from a web address into a custom
I'm using NSJSONSerialization to parse some JSON from my web service, and I want
I have a web method that returns a String[][] and I'm trying to parse
I'm reading a web service that returns a JSON, parse and write into a
I have a JSON which I get from web application. I try this parse

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.