簡體   English   中英

readRDS中的錯誤

[英]Error in readRDS

我正在運行R v3.4.3,嘗試讀取公共可用的rds文件時看到錯誤。

>githubURL<-("https://github.com/ChongWu-Biostat/aSPUpath2/blob/master/Example/example.stat.rds")
>download.file(githubURL,"example.stat.rds", method="curl")
>example.stat<-readRDS("example.stat.rds")
Error in readRDS("example.stat.rds") : unknown input format

該URL指向該文件的網頁。 您已經下載了HTML,並嘗試將其作為.RDS加載。 如果您查看.RDS文件,將會看到。

您確實想要原始數據的URL:

> url = "https://raw.githubusercontent.com/ChongWu-Biostat/aSPUpath2/master/Example/example.stat.rds"
> download.file(url,"example.stat.rds", method="curl")
[download progress...]
> example.stat<-readRDS("example.stat.rds")

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM