From: Uwe L. <li...@st...> - 2008-10-16 09:03:13
|
Rodney Sparapani wrote: > Hi Guys: > > Unfortunately, the patch did not fix the problem. But, maybe it helped > since now I'm getting an error message that I didn't have before: > > fixme:shell:StrRetToStrNW unknown type! > > Looking at the Wine sources, this function is on line 83 of > dlls/shell32/shellstring.c > > This is one of the undocumented functions so I'm not clear > and exactly it's purpose. Based on the type of src, do something? > However, the type of src is not one of the 3 types handled and > nothing is returned! > > Looking at the value of tempdir() gave me an idea why that might be: > >> tempdir() > [1] "/var/folders/z4/z4O5IqhPED0pjZUVP7s0mE+++TI/-Tmp-//RtmphdzhHo" > > There appears to be an R bug here. Two slashes in a row is not > what is wanted. No, but we do not know any OS where it matters (not even Windows) ;-). Hence again also a bug in wine. > Of course, on Unix, this makes no difference since > the extra slash is ignored. But, we are not dealing with Unix, we > are dealing with Wine's implementation of the Windows API. So, after > setting working.directory=tempdir() can we substitute single slashes > for double slashes in working.directory > > so that we get the following instead: > > "/var/folders/z4/z4O5IqhPED0pjZUVP7s0mE+++TI/-Tmp-/RtmphdzhHo" You are looking for gsub(). I have committed the workaround: working.directory <- gsub("//", "/", working.directory) Uwe > I spent some time looking through my S manual trying to find the > function to do this, but I couldn't figure it out. Do S and R > support AWK functions since they were both invented at Bell Labs > (if memory serves)? > |