2017-12-16 43 views
0

rnotebookを使用しているときに、私は箒で線形回帰モデルの出力を得る次のエラーを取得します。Rnotebookを使用して予期せず表示される「一時的な名前が長すぎます」エラー

これは私が遭遇したもののダミー例です。

Error in tempfile(pattern = "_rs_rdf_", tmpdir = outputFolder, fileext = ".rdf") : temporary name too long

ものがあることである:私はエラーを取得整頓(lModel)の出力を取得したい場合は、

N <- 100 
a <- rnorm(N) 
b <- a + rnorm(N) 
df1 <- data.frame(a, b) 

lModel <- lm(b ~ a, df1) 

summary(lModel) 

私は長い前にほうきからのtidy()機能を使用して、出力を得ました。私は何が問題であり、どのように修正できるのだろうかと思います。

Error in tempfile(pattern = "_rs_rdf_", tmpdir = outputFolder, fileext = ".rdf") : temporary name too long 
4. 
tempfile(pattern = "_rs_rdf_", tmpdir = outputFolder, fileext = ".rdf") 
3. 
overridePrint(o$x, o$options, o$className, o$nRow, o$nCol) 
2. 
print.data.frame(x) 
1. 
function (x, ...) UseMethod("print")(x) 

事前にどうもありがとう:

これは、上記のエラーのトレースバックです。

+0

tidy()関数を使用する前に、パッケージがライブラリから呼び出されたことを明確にするだけです。 – ogorodriguez

+0

@ marc_sこの質問に対する修正をありがとうございました。 – ogorodriguez

+0

あなたはどのOSシステムを使用していますか?私はディレクトリがネストされているWindows上でこのようなエラーを見てきました。 Windows APIはかなり短い[最大パス長260文字]です(https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v = vs.85).aspx)。 Unixシステムではこれはかなり長くなりますが、最大ファイル名の長さは255文字です。 – dshkol

答えて

0

このエラーは、ディレクトリがあまりにも多くの階層に入れ子になっているとWindowsシステムで発生します。Windows API has a maximum path length of 260 characters

Maximum Path Length Limitation In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character. For example, the maximum path on drive D is "D:\some 256-character path string" where "" represents the invisible terminating null character for the current system codepage. (The characters < > are used here for visual clarity and cannot be part of a valid path string.)

これは非常に簡単です。作業ディレクトリ、または一時ファイルを保存する構造を調整するだけです。ファイル名が長すぎるか、ディレクトリが深くネストされているため、パスがWindowsのパス制限を超えています。

Unixシステムでは、この最大パスはかなり長くなりますが、最大ファイル名の長さは255文字です。

関連する問題