Hi?Friends? I have installed ks package successfully using R version 3.4.2 on Mac 10.12.6. But when I library it , I have the following problem. error: package or namespace load failed for ?ks?: onLoad fails when'rgl'is calculated in loadNamespace (): Call: dyn.load(file, DLLpath = DLLpath, ...) Error: unable to load shared target object:?/Users/sanyu/Library/R/3.4/library/rgl/libs/rgl.so??: dlopen(/Users/sanyu/Library/R/3.4/library/rgl/libs/rgl.so, 6): Library not loaded: /opt/X11/lib/libGLU.1.dylib Referenced from: /Users/sanyu/Library/R/3.4/library/rgl/libs/rgl.so Reason: image not found This is the first time I write emails to foreign friends , I hope I can get this helps. Wang
package or namespace load failed for ‘ks’
6 messages · Duncan Murdoch, 王宙翔, Timothy Bates +2 more
On 13/11/2017 4:20 AM, ??? wrote:
Hi?Friends? I have installed ks package successfully using R version 3.4.2 on Mac 10.12.6. But when I library it , I have the following problem. error: package or namespace load failed for ?ks?: onLoad fails when'rgl'is calculated in loadNamespace (): Call: dyn.load(file, DLLpath = DLLpath, ...) Error: unable to load shared target object:?/Users/sanyu/Library/R/3.4/library/rgl/libs/rgl.so??: dlopen(/Users/sanyu/Library/R/3.4/library/rgl/libs/rgl.so, 6): Library not loaded: /opt/X11/lib/libGLU.1.dylib Referenced from: /Users/sanyu/Library/R/3.4/library/rgl/libs/rgl.so Reason: image not found This is the first time I write emails to foreign friends , I hope I can get this helps. Wang
The problem here is with the rgl package. It requires that you have XQuartz installed. That's not an R package, it's available from xquartz.org. Duncan Murdoch
Hi?Friends?
When I want to read datas from csv , I have the following problem.
For example:
auto.csv ?
E <- read.csv("auto.csv", header=T)
But E$age is NULL
?on windows, E$age is not NULL?.
Thank you ,everyone. I hope get this helps
Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20171113/4d1c6b09/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.png
Type: image/png
Size: 11686 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20171113/4d1c6b09/attachment.png>
likely the separator character is not the default "," that csv expects.
look in the csv file and see what the separator character is: perhaps it is a ";"
try:
df <- read.csv("example.csv", header=TRUE, sep=";"); names(df)
On 13 Nov 2017, at 1:07 pm, ??? <wzx0908 at icloud.com> wrote:
Hi?Friends?
When I want to read datas from csv , I have the following problem.
For example:
auto.csv ?
<PastedGraphic-1.png>
E <- read.csv("auto.csv", header=T)
But E$age is NULL
?on windows, E$age is not NULL?.
Thank you ,everyone. I hope get this helps
Wang
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
Hi, Try this: - attach(E) - E$auto
On Nov 13, 2017 6:37 PM, "???" <wzx0908 at icloud.com> wrote:
Hi?Friends?
When I want to read datas from csv , I have the following problem.
For example:
auto.csv ?
E <- read.csv("auto.csv", header=T)
But E$age is NULL
?on windows, E$age is not NULL?.
Thank you ,everyone. I hope get this helps
Wang
_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20171113/a1cfbf5a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.png
Type: image/png
Size: 11686 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20171113/a1cfbf5a/attachment.png>
3 days later
In addition to which:
what does
str(E)
show?
The file is small, so what do you get when you simply time
E
at the R prompt?
header is TRUE by default in read.csv(), so it was unnecessary to supply header=T
read.csv2() has header=TRUE and sep=";" by default, so simply
read.csv2('auto.csv')
should be sufficient if Tim's suggestion is the explanation.
read.csv() and friends are solid, reliable, and extremely well tested functions. If they don't succeed, you can assume that your data is different than expected. So inspect your data file to try and see what that might be.
Mac and Windows have different end-of-line conventions, but as far as I know read.csv and friends are smart enough to handle that.
Your locale setting might be relevant, but that's pretty much outside my experience.
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
Lab cell 925-724-7509
On 11/13/17, 7:29 AM, "R-SIG-Mac on behalf of BATES Timothy" <r-sig-mac-bounces at r-project.org on behalf of tim.bates at ed.ac.uk> wrote:
likely the separator character is not the default "," that csv expects.
look in the csv file and see what the separator character is: perhaps it is a ";"
try:
df <- read.csv("example.csv", header=TRUE, sep=";"); names(df)
> On 13 Nov 2017, at 1:07 pm, ??? <wzx0908 at icloud.com> wrote:
>
> Hi?Friends?
> When I want to read datas from csv , I have the following problem.
> For example:
> auto.csv ?
> <PastedGraphic-1.png>
>
> E <- read.csv("auto.csv", header=T)
> But E$age is NULL
> ?on windows, E$age is not NULL?.
> Thank you ,everyone. I hope get this helps
> Wang
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac