2013-07-10 16 views
1

나는 온라인에서함수를 사용하여 R의 일부 온라인 pdf 문서를 읽으려고했습니다. 내 스크립트가이readPDF (tm 패키지) in R

safex <- readPDF(PdftotextOptions='-layout')(elem=list(uri='C:/Users/FCG/Desktop/NoteF7000.pdf'),language='en',id='id1') 

R처럼 간다 명령을 실행하는 상태 (309) 나는 다른 pdftotext 옵션을 시도이있는 메시지를 보여 주었다. 그러나, 그것은 같은 메시지입니다. 생성 된 텍스트 파일에는 내용이 없습니다.

사람 read this pdf

+0

'PATH'를 모두 가지고 있다고 가정하고 있습니까? –

+0

@ RomanLuštrik, Windows 환경 변수에서 경로를 편집한다는 의미입니까? – Lawrence

+0

예, 경로가 순서대로 있습니까? 함수에서 사용하는 모든 프로그램에 연결할 수 있습니까? –

답변

3

readPDFbugs을 가지고 있으며, 아마와 귀찮게 가치가 없다 (그것으로 this well-documented struggle 체크 아웃) 할 수 있습니다.

(자세한 내용은 here 참조)

  1. 당신이 xpdf 가지고 설치 한 ... 가정하면

  2. 당신의 경로있는 모든 위해 (그렇게하는 방법에 대한 자세한 내용은 here 참조) 컴퓨터를 다시 시작했습니다.

은 그럼 당신은 readPDF을 피하고 대신이 해결 방법 사용하여 더 나을 수 있습니다

system(paste('"C:/Program Files/xpdf/pdftotext.exe"', 
      '"C:/Users/FCG/Desktop/NoteF7000.pdf"'), wait=FALSE) 

을 그리고 다음과 같이 R에 텍스트 파일을 읽어 ...

require(tm) 
mycorpus <- Corpus(URISource("C:/Users/FCG/Desktop/NoteF7001.txt")) 

그리고이 잘 돌아 갔는지 확인하기위한 모습 :

inspect(mycorpus) 

A corpus with 1 text document 

The metadata consists of 2 tag-value pairs and a data frame 
Available tags are: 
    create_date creator 
Available variables in the data frame are: 
    MetaID 

[[1]] 
Market Notice 
Number: Date F7001 08 May 2013 

New IDX SSF (EWJG) The following new IDX SSF contract will be added to the list and will be available for trade today. 

Summary Contract Specifications Contract Code Underlying Instrument Bloomberg Code ISIN Code EWJG EWJG IShares MSCI Japan Index Fund (US) EWJ US EQUITY US4642868487 1 (R1 per point) 

Contract Size/Nominal 

Expiry Dates & Times 

10am New York Time; 14 Jun 2013/16 Sep 2013 

Underlying Currency Quotations Minimum Price Movement (ZAR) Underlying Reference Price 

USD/ZAR Bloomberg Code (USDZAR Currency) Price per underlying share to two decimals. R0.01 (0.01 in the share price) 

4pm underlying spot level as captured by the JSE. 

Currency Reference Price 

The same method as the one utilized for the expiry of standard currency futures on standard quarterly SAFEX expiry dates. 

JSE Limited Registration Number: 2005/022939/06 One Exchange Square, Gwen Lane, Sandown, South Africa. Private Bag X991174, Sandton, 2146, South Africa. Telephone: +27 11 520 7000, Facsimile: +27 11 520 8584, www.jse.co.za 

Executive Director: NF Newton-King (CEO), A Takoordeen (CFO) Non-Executive Directors: HJ Borkum (Chairman), AD Botha, MR Johnston, DM Lawrence, A Mazwai, Dr. MA Matooane , NP Mnxasana, NS Nematswerani, N Nyembezi-Heita, N Payne Alternate Directors: JH Burke, LV Parsons 

Member of the World Federation of Exchanges 

Company Secretary: GC Clarke 
Settlement Method 

Cash Settled 

- 

Clearing House Fees - 

On-screen IDX Futures Trading: o 1 BP for Taker (Aggressor) o Zero Booking Fees for Maker (Passive) o No Cap o Floor of 0.01 Reported IDX Futures Trades o 1.75 BP for both buyer and seller o No Cap o Floor of 0.01 

Initial Margin Class Spread Margin V.S.R. Expiry Date 

R 10.00 R 5.00 3.5 14/06/2013, 16/09/2013 

The above instrument has been designated as "Foreign" by the South African Reserve Bank 

Should you have any queries regarding IDX Single Stock Futures, please contact the IDX team on 011 520-7399 or [email protected] 

Graham Smale Director: Bonds and Financial Derivatives Tel: +27 11 520 7831 Fax:+27 11 520 8831 E-mail: [email protected] 

Distributed by the Company Secretariat +27 11 520 7346 

Page 2 of 2