yjlee168
★★

Kaohsiung, Taiwan,
2019-07-08 08:15

Posting: # 20377
Views: 12,174

updates of installation bear with macOS (Mojave) [R for BE/BA]

Dear all,

This is to renew my previous post about installation of bear (or my other R packages using RGtk2 package. For Windows OS or Linux users, the previous posts still hold true. Now, the problem occurs with macOS (Mojave). If you upgrade R to current version (v3.6.1), you may need to read this carefully. The key point is the issue of RGtk2 package installation. As default from preinst.r, RGtk2 is installed as type="binary" which is default for install.packages() function. For most of R packages, this should be no problem at all with macOS. Unfortunately, RGtk2 is an exception. So we need to install RGtk2 correctly; otherwise you will get error messages something like    Error in dyn.load(file, DLLpath = DLLpath, ...) :   unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RGtk2/libs/RGtk2.so':   dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RGtk2/libs/RGtk2.so, 6): Library not loaded: /Library/Frameworks/GTK+.framework/Versions/2.24.X11/Resources/lib/libgtk-x11-2.0.0.dylib   Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RGtk2/libs/RGtk2.so   Reason: image not found
And there will be a popup window to ask if ‘Need GTK+?’ which was a broken link and was unable to install GTK+ (driver). I have tried thousand times and failed to connect. However, if you can get it from it, do not use it. If you try to install RGtk2 from its source with install.packages("RGtk2",type="source"), you will get another error messages "... gtk is not found. gtk 2.8.0 or above is required.' That implies gtk+ installation previously using Homebrew is not recognized by R any more. So the following steps can resolve this problem (tested with bear v2.8.4/R v3.6.1 with macOS (Mojave)).
$sudo rm -rf /Library/Frameworks/R.framework 2. Install new R (R-x.x.x.pkg) and re-install gfortan_6.1.pkg (it is required; obtained it from CRAN mirror): Remember to install R first followed by gfortran_6.1.pkg. This is because gfortran will install some fortran/C/C++ header files into /R.framework; so we have to do it again; 3. Re-install RGtk2 and cairoDevice package as previous post; 4. Re-run source(“preinst.r”) under R console; 5. Re-install bear package. That's it. All the best, -- Yung-jin Lee bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear Download link (updated) -> here yjlee168 ★★ Kaohsiung, Taiwan, 2019-07-08 09:14 @ yjlee168 Posting: # 20379 Views: 8,710 an old itch when running RGtk2 (GUI) with macOS Dear all, This has been an old problem and I used to leave it as it was. The problem is when we try to retrieve a input data file with gfile() function from RGtk2, I usually get the error message as follows:(R:351): Gtk-WARNING **: 10:28:58.039: Attempting to read the recently used resources file at /Users/username/.local/share/recently-used.xbel', but the parser failed: Failed to open file “/Users/username/.local/share/recently-used.xbel”: Permission denied.  where username is your login name, of course. It does not matter at all because the package still can read the input file correctly. However, it just make me itch for a long time. Recently, I solve the puzzle. It can be easily fixed with a terminal and type  mkdir /Users/username/.local /Users/username/.local/share. Please do not use  sudo mkdir /Users/username/.local /Users/username/.local/share unless you run R with sudo R every time; otherwise you still get "... Permission denied". When I asked Google master several years ago, some nice people always suggested that we should use sudo mkdir /Users/username/.local /Users/username/.local/share to fix this problem. However, I still got ".... Permissions denied." That's because I did not use sudo R, instead of just R to run R. If you get this error messages, just fix it and do not let itch keeps bothering you. And this only occurs with macOS. All the best, -- Yung-jin Lee bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear Download link (updated) -> here yjlee168 ★★ Kaohsiung, Taiwan, 2019-08-11 18:29 (edited by yjlee168 on 2019-08-12 11:22) @ yjlee168 Posting: # 20493 Views: 8,361 upgrade/re-install cairoDevice package from source (macOS) Dear all, I found the package cairoDevice was upgraded again. As default, it is installed using the binary (*.tgz) from CRAN. Then it will incur errors when using together with RGtk2 for macOS users. So please install or upgrade the package cairoDeivce from source, if running bear. Type install.packages("cairoDevice",type="source") in the terminal. It will fix the errors. Do the same thing for the package RGtk2 (install.packages("RGtk2",type="source")) upgrade later. All the best, -- Yung-jin Lee bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear Download link (updated) -> here mahmoud-teaima ★ 2020-04-09 11:01 @ yjlee168 Posting: # 21323 Views: 7,204 updates of installation bear with macOS (Mojave) Dear YJ Lee, I recently updated my software into macOs Catalina 10.15.4 and R from 3.5.1 into R version 3.6.3 (2020-02-29) -- "Holding the Windsock"Copyright (C) 2020 The R Foundation for Statistical Computing, Platform: x86_64-apple-darwin15.6.0 (64-bit), BUT i faces some difficulties installing bear again. I followed your instructions in the post below, some steps went well but some gave an error message as follows: » In summary, you will need Xcode (done) and Xcode command line tool (done) and MacPorts (done). Download and install. Go to CRAN mirror to download RGtk2 (done) and cairoDevice source tarballs (*.tar.gz) (done). Put these two tar ball files under your working directory (done). And open a terminal type » » $ export PATH=/opt/local/bin:/opt/local/sbin:$PATH ###done » $ sudo port selfupdate                             ###done
» $sudo port install pkgconfig ###done » $ sudo port install gtk2 +x11                      ### <- this is extremely important.
###error "MacBook-Pro-2:~ mahmoudteaima$sudo port install gtk2 +x11 ---> Computing dependencies for xorg-libXau The following dependencies will be installed: xorg-xorgproto Continue? [Y/n]: Y ---> Activating xorg-xorgproto @2019.2_0 Error: Failed to activate xorg-xorgproto: Image error: /opt/local/include/X11/DECkeysym.h is being used by the active xorg-xproto port. Please deactivate this port first, or use 'port -f activate xorg-xorgproto' to force the activation. Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_xorg-xorgproto/xorg-xorgproto/main.log for details. Error: Unable to execute port: upgrade atk failed " $ R CMD INSTALL RGtk2_x.xx.xx.tar.gz
$R CMD INSTALL cairoDevice_x.xx.tar.gz  Please, advise. Greetings. Mahmoud Teaima, PhD. yjlee168 ★★ Kaohsiung, Taiwan, 2020-04-09 13:46 @ mahmoud-teaima Posting: # 21326 Views: 7,200 bear with Catalina OS Dear mahmound-teaima, If you upgraded macOS from Mojave to Catalina, you did not need to re-install everything. You only need to upgrade R and re-install bear (please see my previous post about how to upgrade R and bear). I have not tested the whole installation processes with a brand new Catalina macOS yet. Hope this can help. All the best, -- Yung-jin Lee bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear Download link (updated) -> here yjlee168 ★★ Kaohsiung, Taiwan, 2020-04-29 08:19 (edited by yjlee168 on 2020-04-29 19:01) @ mahmoud-teaima Posting: # 21359 Views: 6,932 Installing R v4.0.0 & bear on Catalina (macOS 10.15.3) Dear Mahmound, I just installed R v4.0.0 and bear on Catalina under virtualbox (VM). It is the same as previous steps on Mojave (see the attached picture). That is to install Xcode, Xcode commander line (both can be downloaded from Apple Development Center; login req.), MacPorts and XQuartz. Then install R v4.0.0 and GNU Fortran as described in CRAN website. No need to install RGtk2 & cairoDevice packages separately. I have already included these steps into 'preinst.r'. $ export PATH=/opt/local/bin:/opt/local/sbin:$PATH$ sudo port selfupdate $sudo port install pkgconfig$ sudo port install gtk2 +x11 

The only warning I had during running bear was:
Unable to create basic Accelerated OpenGL renderer. Unable to create basic Accelerated OpenGL renderer. Core Image is now using the software OpenGL renderer. This will be slow.

This is a new warning message to me. However, it still runs well. I need to find out how to solve the issue (OpenGL renderer stuffs; it seems there is no way to fix it. It's Catalina. OpenGL has been deprecated by Apple. Please see this and this).

So I would like to suggest that you may consider to remove R first from your iMac and try the setup steps again. If it still doesn't work, the you may consider to re-set your iMac back to factory default first (remember to back up all your important data/files before that!). Sorry to keep you waiting.

All the best,
-- Yung-jin Lee
bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear
mahmoud-teaima
★

2020-04-29 13:09

@ yjlee168
Posting: # 21361
Views: 6,921

updates of installing bear/R v4.0.0 with macOS (Catalina)

Dear YJLee,
Thanks for your reply. I still have problems in running bear on R4.0.0, i get the following error message.

library(bear) Error: package or namespace load failed for ‘bear’:  package ‘bear’ was installed before R 4.0.0: please re-install it > install.packages("~/bear_2.8.7.tgz", repos = NULL, type = .Platform$pkgType) > library(bear) Error: package or namespace load failed for ‘bear’: package ‘bear’ was installed before R 4.0.0: please re-install it > install.packages("~/bear_2.8.7.tgz", repos = NULL, type = .Platform$pkgType) > library(bear) Error: package or namespace load failed for ‘bear’:  package ‘bear’ was installed before R 4.0.0: please re-install it > install.packages("~/bear_2.8.7.tgz", repos = NULL, type = .Platform$pkgType) > library(bear) Error: package or namespace load failed for ‘bear’: package ‘bear’ was installed before R 4.0.0: please re-install it". please, advise. Mahmoud Teaima, PhD. yjlee168 ★★ Kaohsiung, Taiwan, 2020-04-29 14:13 (edited by yjlee168 on 2020-04-29 19:13) @ mahmoud-teaima Posting: # 21363 Views: 6,920 tricks of R v4.0.0 Dear Mahmound, Right. R v4.0.0 requires all packages rebuild for it. The binary file (*.tgz) on SourceForge now was built under previous version (R v3.6.x). So you need to download the source tarball file (*.tar.gz) of bear from here and place it in your working folder (getwd() to know where it is). Then open an terminal, type R CMD INSTALL bear_2.8.7.tar.gz [Enter]. It should work. I have done with upgrade to R v4.0.0 on Windows and macOS (both Mojave & Catalina). Now is waiting for linux-ubuntu (from its software update). Ps. (1) However packages binary built under R v4.0.0 can be installed for R v3.6.x without any compatibility issue. (2) R v4.0.0 seems running faster on Windows, but much slower on Catalina... just my gut feeling. » library(bear) » Error: package or namespace load failed for ‘bear’: » package ‘bear’ was installed before R 4.0.0: please re-install it All the best, -- Yung-jin Lee bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear Download link (updated) -> here mahmoud-teaima ★ 2020-04-29 21:00 @ yjlee168 Posting: # 21368 Views: 6,874 tricks of R v4.0.0 Dear YJLee, Thanks for the detailed guidance. It worked well. Greetings. Mahmoud Teaima, PhD. yjlee168 ★★ Kaohsiung, Taiwan, 2020-04-29 23:19 @ mahmoud-teaima Posting: # 21369 Views: 6,864 tricks of R v4.0.0 Dear mahmoud, Great. I believe that you use a real mac computer. So did you get the same warning messages as I did when running bear? just being curious... You can open that R app. GUI instead of using a terminal to run R. Then the warning messages appear right over there before running library(bear). All the best, -- Yung-jin Lee bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear Download link (updated) -> here mahmoud-teaima ★ 2020-04-30 23:38 @ yjlee168 Posting: # 21380 Views: 6,685 tricks of R v4.0.0 Dear YJLee, I ran an old project on bear2.7.8 running on R4.0.0 through RStudio 1.2.5042 on macOS Catalina 10.15.4, MacBook Pro (Retina, 15-inch, Mid 2015). I have some comments on the output: 1. conc. time plots: only cartesian plot are there, no semilog plots; subject number is missing from title of plots; error bars are not clear in the mean conc. time plot on cartesian scale. 2. i got an error message in console as follows: Hotelling T^2 with Chi-square Test ------------------------------------- Error in is.finite(x) : default method not implemented for type 'list' Other output files are OK. Greetings. Mahmoud Teaima, PhD. yjlee168 ★★ Kaohsiung, Taiwan, 2020-05-01 21:42 (edited by yjlee168 on 2020-05-01 22:36) @ mahmoud-teaima Posting: # 21382 Views: 6,528 errors of bear in R v4.0.0 Hi Mahmoud, You're right. These errors appear in all plotforms (Windows 10, macOS and Linux-Ubuntu). » 1. conc. time plots: only cartesian plot are there, no semilog plots; subject number is missing from title of plots; error bars are not clear in the mean conc. time plot on cartesian scale. The problem can be due to the package ggplot2. The function of labs(title=...,) in ggplot2 doesn't work properly. Plots are created by ggplot2 for this part. However, the plots of lambda_z selection are fine (with subject #). They are created with R built-in plot(). Should we wait for the update of ggplot2 or just switch back to R built-in plot()? » 2. i got an error message in console as follows: » Hotelling T^2 with Chi-square Test » ------------------------------------- » Error in is.finite(x) : default method not implemented for type 'list'" The line stop at formatC(...). I still don't know how to fix it so far since I cannot find anything wrong. It is for outlier detection analysis (ODA). Turning it off can avoid the error. Ps. or maybe going back to R v3.6.3 is a good idea. Thanks for reporting the errors. All the best, -- Yung-jin Lee bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear Download link (updated) -> here yjlee168 ★★ Kaohsiung, Taiwan, 2020-05-04 23:53 (edited by yjlee168 on 2020-05-05 08:05) @ mahmoud-teaima Posting: # 21399 Views: 5,994 errors of bear in R v4.0.0 Hi mahmoud, » I ran an old project on bear2.7.8 running on R4.0.0 .. OK, but why did you choose v2.7.8? Is there any particular reason for doing that? Did you mean bear v2.8.7, not v2.7.8? If yes, sorry for my misunderstanding. » 1. conc. time plots: only cartesian plot are there, no semilog plots; subject number is missing from title of plots; error bars are not clear in the mean conc. time plot on cartesian scale. Yes, I have fixed all these plotting issues/errors. The next release should be fine. » 2. i got an error message in console as follows: » Hotelling T^2 with Chi-square Test » ------------------------------------- » Error in is.finite(x) : default method not implemented for type ' I still work on this. I don't know how to fix it yet. The error did not exist at all when I run bear v2.8.7 on R v3.6.3. Therefore, I was wondering if I should take 'Hotelling T^2 with Chi-square Test' out off ODA temporarily for the next release. But other ODAs still work well. I will try more to see if I can fix it anyway. And finally I still stay with R v4.0.0. All the best, -- Yung-jin Lee bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear Download link (updated) -> here Helmut ★★★ Vienna, Austria, 2020-04-30 10:38 @ yjlee168 Posting: # 21370 Views: 6,832 speed? Hi Yung-jin, » R v4.0.0 seems running faster on Windows … Really? I removed 3.6.3 yesterday. If you still have it, can you do me a favor and perform a demanding check (sample size by 105 subject simulations for a partial replicate design with heterogenicity, the EMA’s approach of reference-scaling, assumed T/R-ratio 0.9, target power 0.8): library(PowerTOST) if (packageVersion("PowerTOST") < "1.4.8") { stop("Please install the latest version from CRAN.") } else { CVp <- 0.4 # pooled CVw CV <- signif(CVp2CV(CV = CVp, ratio = 2.5), 4) # CVwT > CVwR system.time(sampleN.scABEL.sdsims(CV = CV, design = "2x3x3", print = FALSE)[["Sample size"]])[3] } BTW, I love that in 4.0.0 the default of stringsAsFactors was changed to FALSE. Something I regularly forgot in imports or assigning data.frames Dif-tor heh smusma 🖖 Helmut Schütz The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes ElMaestro ★★★ Belgium?, 2020-04-30 11:04 @ Helmut Posting: # 21371 Views: 6,812 OT: What a relief :-) Hi Hötzi, » BTW, I love that in 4.0.0 the default of stringsAsFactors was changed to FALSE. » Something I regularly forgot in imports or assigning data.frames Slightly OT: I am relieved to hear it is not only me who has trouble with it. I can't tell you how many times I have been on the verge of a mental breakdown because I absentmindedly leave out that effing parameter. Happened as recently as yesterday. R is a smart language but I am not a very smart coder I have to admit I am frequently also resorting to stuff like AN=function(x) {return(as.numeric(as.character(x)))}  in order to compensate for the errors and omissions I make left and right and everywhere on data frames. It is disgusting, I know. I could be wrong, but... Best regards, ElMaestro "Pass or fail" (D. Potvin et al., 2008) Helmut ★★★ Vienna, Austria, 2020-04-30 13:21 @ ElMaestro Posting: # 21372 Views: 6,779 OT: What a relief :-) Ahoy, my capt’n! » Slightly OT: I am relieved to hear it is not only me who has trouble with it. This annoyed me for ages (IIRC, I started with R in 2003). » I have to admit I am frequently also resorting to stuff like » AN=function(x) {return(as.numeric(as.character(x)))} » in order to compensate for the errors and omissions I make left and right and everywhere on data frames. It is disgusting, I know. The only solution. Tons of posts at stackoverflow and even mentioned in R’s FAQs. Dif-tor heh smusma 🖖 Helmut Schütz The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes yjlee168 ★★ Kaohsiung, Taiwan, 2020-04-30 13:53 @ Helmut Posting: # 21373 Views: 6,774 speed? Dear Helmut, » Really? I removed 3.6.3 yesterday. If you still have it, can you do me a favor... Nope, v3.6.3 was gone three days ago. Sorry about that. However, I still run the your codes on different platforms and got the following result: R v4.0.0 platforms elapsed time (sec) -------------------------------------- Windows 10 37.11 Catalina macOS 37.956 (VM, host: Windows 10) Mojave macOS 42.25 (, still I will suggest stay with Mojave if possible) (VM, host: linux) linux_ubuntu 32.47 (linuxmint, x64) -------------------------------------- » BTW, I love that in 4.0.0 the default of stringsAsFactors was changed to [FALSE Indeed. That's a great improvement. I like that too. BTW, there are some plural-form or plus s commands/functions, such as 'install.packages("foo")', 'file.exists("foo")'. Sometimes I got confused. I think it should be possible to make these the same, such as install.packages(...) = install.package(...), and file.exists(...) = file.exist(...) in the future. What do you think? » Something I regularly forgot in imports or assigning data.frames me too. All the best, -- Yung-jin Lee bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear Download link (updated) -> here Helmut ★★★ Vienna, Austria, 2020-04-30 15:30 @ yjlee168 Posting: # 21374 Views: 6,759 speed? Hi Hi Yung-jin, » Nope, v3.6.3 was gone three days ago. Sorry about that. However, I still run the your codes on different platforms and got the following result: […] THX, interesting! To test you assumption, I re-installed 3.6.3. Medians of five runs: 3.6.3: 31.11 seconds 4.0.0: 31.69 seconds Hence, your gut feeling was possibly based on wishful thinking. » BTW, there are some plural-form or plus s commands/functions, such as 'install.packages("foo")', 'file.exists("foo")'. Sometimes I got confused. I think it should be possible to make these the same, such as install.packages(...) = install.package(...), and file.exists(...) = file.exist(...) in the future. What do you think? Yes, that’s strange. Would be easy to define an alias in R-core, like we have in PowerTOST: CVfromCI()CI2CV(), CVwRfromU()U2CVwR(). Dif-tor heh smusma 🖖 Helmut Schütz The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes yjlee168 ★★ Kaohsiung, Taiwan, 2020-04-30 16:40 @ Helmut Posting: # 21378 Views: 6,744 speed? Hi Helmut, » 3.6.3: 31.11 seconds » 4.0.0: 31.69 seconds Amazing! It runs even faster in your machine than under linux. What's your CPU & RAM size? » Hence, your gut feeling was possibly based on wishful thinking. » Yes, that’s strange. » Would be easy to define an alias in R-core, ... exactly. it said "... R is natural language support but running in an English locale." All the best, -- Yung-jin Lee bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear Download link (updated) -> here Helmut ★★★ Vienna, Austria, 2020-04-30 21:40 @ yjlee168 Posting: # 21379 Views: 6,707 speed? Hi Yung-jin, » What's your CPU & RAM size? Six years old Xeon @3.4GHz (not overclocked), 16MB, 64bit Win 7. » » Would be easy to define an alias in R-core, ... » » exactly. it said "... R is natural language support but running in an English locale." Dif-tor heh smusma 🖖 Helmut Schütz The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes yjlee168 ★★ Kaohsiung, Taiwan, 2020-05-01 22:02 @ Helmut Posting: # 21384 Views: 6,525 Xeon CPU Hi Helmut, » Six years old Xeon @3.4GHz (not overclocked), 16MB, 64bit Win 7. No way! Xeon CPU? unless you assemble the motherboard yourself. However, I heard Xeon is a great and cheaper CPU. Some people get Xeon from retired server machines. It is not so easy to find the motherboard from the market to fit Xeon right now. So it's a very special PC. Indeed. All the best, -- Yung-jin Lee bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear Download link (updated) -> here Helmut ★★★ Vienna, Austria, 2020-05-01 23:22 @ yjlee168 Posting: # 21385 Views: 6,501 Xeon (workstation, server) ↔ Core iX (desktop) Hi Yung-jin, » » Five years old Xeon @3.4GHz (not overclocked), 16MB, 64bit Win 7. » No way! Xeon CPU? Yessir! » unless you assemble the motherboard yourself. Nope. ASUS P9D WS. » However, I heard Xeon is a great … Yes. » … and cheaper CPU. On the contrary and for a reason. » Some people get Xeon from retired server machines. It is not so easy to find the motherboard from the market to fit Xeon right now. So it's a very special PC. Indeed. It’s a workstation. All Xeons (for servers and workstations) have their desktop counterparts with the same architecture. For my Xeon it’s a Core i3. The main differences are: Generally larger L3-cache, require motherboards with other chip­sets than desktop systems supporting server-grade unbuffered ECC RAM, rated for continuous 100% CPU load. Since I regularly run simulations 24/7 (for weeks), the last two points are important for me. All this stuff is more expensive: Such mainboards are produced in much lower numbers, the EEC RAM is more complex, and last but not least the CPU itself. Previously I had Dell workstations with double Xeons (i.e., before multi-cores were available) but the howling fans drove me crazy. Now I have a fan­less system (including the graphics card) with monstrous copper-coolers and double heatpipes. Weighs ~20 kg and came for 2,550 € in 2014 (2 × 256GB SSD, 4TB HD, GTX750 Ti, DVD writer, 430W PSU). The silence is deafening. Dif-tor heh smusma 🖖 Helmut Schütz The quality of responses received is directly proportional to the quality of the question asked. 🚮 Science Quotes jabriges ☆ US, 2020-05-10 02:42 @ yjlee168 Posting: # 21411 Views: 5,339 updates of installation bear with macOS (Mojave) Running MacOS 10.15.3 (Catalina), I followed all these steps including the Xcode+command line, MacPort, RGtk2, and Cairo, and I still get errors trying to run Bear. Running go() gives the error Error: package or namespace load failed for ‘gWidgetsRGtk2’: .onAttach failed in attachNamespace() for 'gWidgetsRGtk2', details: call: .Call(name, ..., PACKAGE = PACKAGE) error: "S_gtk_icon_factory_new" not available for .Call() for package "RGtk2" Loading required package: gWidgetsRGtk2 Error: package or namespace load failed for ‘gWidgetsRGtk2’: .onAttach failed in attachNamespace() for 'gWidgetsRGtk2', details: call: .Call(name, ..., PACKAGE = PACKAGE) error: "S_gtk_icon_factory_new" not available for .Call() for package "RGtk2" Error in .Call(name, ..., PACKAGE = PACKAGE) : "S_gtk_window_new" not available for .Call() for package "RGtk2" Any suggestions appreciated. -Jay Edit: Full quote removed. Please delete everything from the text of the original poster which is not necessary in understanding your answer; see also this post #5[Helmut] yjlee168 ★★ Kaohsiung, Taiwan, 2020-05-10 20:30 (edited by yjlee168 on 2020-05-10 21:10) @ jabriges Posting: # 21413 Views: 5,184 errors of installation bear with Catalina Hi Jay, Did you run source("preinst.r") before install bear? If yes, please run install.packages("RGtk2", type="source") to re-install RGtk2 package and see if it can be installed without any problem. I wonder RGtk2 was not installed successfully. Thus gWidgetsRGtk2 failed. BTW, I still work on bear v2.8.8 with R v4.0.0. If you have R v4.0.0 and Catalina macOS, please do not install bear right now. I will release bear v2.8.8 asap. Sorry about that. » .. and I still get errors trying to run Bear... All the best, -- Yung-jin Lee bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear Download link (updated) -> here jabriges ☆ US, 2020-05-10 21:42 @ yjlee168 Posting: # 21414 Views: 5,168 errors of installation bear with Catalina Thanks for the reply, YJ. I ran preinst.r previously so I tried the install.packages("RGtk2", type="source") you suggested and it completes, but the last bit of the output shows this: ** testing if installed package can be loaded from temporary location R session is headless; GTK+ not initialized. ** checking absolute paths in shared objects and dynamic libraries ** testing if installed package can be loaded from final location R session is headless; GTK+ not initialized. ** testing if installed package keeps a record of temporary installation path * DONE (RGtk2) I''m not sure if that is a problem. After that, if I re-install bear, then I get the message R session is headless; GTK+ not initialized. Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/cairoDevice/libs/cairoDevice.so': dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/cairoDevice/libs/cairoDevice.so, 6): Library not loaded: /opt/X11/lib/libcairo.2.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/cairoDevice/libs/cairoDevice.so Reason: image not found Need GTK+ ? (Restart R after installing) 1: Install GTK+ 2: Do not install GTK+ Selection: Any suggestions? Thanks, Jay yjlee168 ★★ Kaohsiung, Taiwan, 2020-05-10 22:40 @ jabriges Posting: # 21415 Views: 5,153 errors of installation bear with Catalina Hi Jay, Rgiht. It sounds like gtk+ driver was not installed correctly. Did you install gtk+ driver with Macport first? $ export PATH=/opt/local/bin:/opt/local/sbin:$PATH$ sudo port selfupdate $sudo port install pkgconfig$ sudo port install gtk2 +x11

Make sure all above four steps end up with no error. Then run source("preinst.r") again. If you still get some errors, you may consider removing all R first. And re-install R (I saw you installing R v3.6.x from your messages.)

» ...** testing if installed package can be loaded from temporary location
» R session is headless; GTK+ not initialized.

» Need GTK+ ? (Restart R after installing)
»
» 1: Install GTK+
» 2: Do not install GTK+

Do not install gtk+ like this. It won't work with macOS. It only works for Windows OS.

All the best,
-- Yung-jin Lee
bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear
jabriges
☆

US,
2020-05-11 03:05

@ yjlee168
Posting: # 21416
Views: 5,113

errors of installation bear with Catalina

Thanks YJ. I re-installed R, now 4.0.0, and the 4 steps below work with no error. Then after running preinst.r and re-installing bear, I get the following error

> library(bear) Error: package or namespace load failed for ‘bear’:  package ‘bear’ was installed before R 4.0.0: please re-install it

Any suggestions?

-Jay

»
» $export PATH=/opt/local/bin:/opt/local/sbin:$PATH» $sudo port selfupdate»$ sudo port install pkgconfig» $sudo port install gtk2 +x11 yjlee168 ★★ Kaohsiung, Taiwan, 2020-05-11 09:15 (edited by yjlee168 on 2020-05-11 17:56) @ jabriges Posting: # 21418 Views: 5,064 bear v2.8.8 pre-release built under R v4.0.0 for macOS Hi Jay, » ... » Error: package or namespace load failed for ‘bear’: » package ‘bear’ was installed before R 4.0.0: please re-install it » Any suggestions? My suggestion is you should search the Forum with 'package ‘bear’ was installed before R 4.0.0' (should be somewhere in this thread). However in order to test your installations (quite tough,isn't it? ), I have uploaded bear v2.8.8 (pre-release) built under R v4.0.0 for macOS. You can find it and download it from my Google cloud HD (here). Place this *.tgz file under R working directory and type install.packages("bear_2.8.8.tgz",repos=NULL) [Enter] to install bear. Hotelling's T2 test of outlier detection analysis (ODA) is disabled for this pre-release. Why? See my previous post in this thread. I still work on it. All the best, -- Yung-jin Lee bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear Download link (updated) -> here jabriges ☆ US, 2020-05-11 16:06 @ yjlee168 Posting: # 21422 Views: 4,973 still having problems w/ bear v2.8.8 for R v4.0.0 for macOS YJ, Thanks for sending v2.8.8. I installed that, then upon go() it makes RStudio quit. So I switched to R.app and go() gives R session is headless; GTK+ not initialized. R session is headless; GTK+ not initialized. (R:12526): Gtk-WARNING **: 09:02:02.264: gtk_disable_setlocale() must be called before gtk_init() *** caught segfault *** address 0x18, cause 'memory not mapped' Traceback: 1: .RGtkCall("S_gtk_widget_show", object, PACKAGE = "RGtk2") 2: method(obj, ...) 3: window$Show()  4: .gwindow(toolkit, title, visible, width, height, parent, handler,     action, ...)  5: .gwindow(toolkit, title, visible, width, height, parent, handler,     action, ...)  6: gwindow("bear v2.8.8")  7: bGUI(bear.set)  8: go()

Any suggestions?

-Jay
yjlee168
★★

Kaohsiung, Taiwan,
2020-05-11 18:23

@ jabriges
Posting: # 21423
Views: 4,925

still having problems w/ bear v2.8.8 for R v4.0.0 for macOS

Hi Jay,

It's still the problem of gtk+ driver. Could you do install.packages("RGtk2", type="source") to see if you can install RGtk2 package from its source? This can verify if you have gtk+ driver installed correctly as we have discussed before.

All the best,
-- Yung-jin Lee
bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear
jabriges
☆

US,
2020-05-11 19:00

@ yjlee168
Posting: # 21424
Views: 4,913

still having problems w/ bear v2.8.8 for R v4.0.0 for macOS

Hi YJ,
Yes, install.packages("RGtk2", type="source") seems to run fine and finishes. Then after loading bear and entering go(), I get the same error.

Any other suggestions?

-Jay
yjlee168
★★

Kaohsiung, Taiwan,
2020-05-11 19:21
(edited by yjlee168 on 2020-05-11 20:05)

@ jabriges
Posting: # 21425
Views: 4,911

still having problems w/ bear v2.8.8 for R v4.0.0 for macOS

Hi Jay,

Please download preinst.r from here and place it in your working directory, together with bear_2.8.8.tgz. Then run source("preinst.r"), and do("bear","bear_2.8.8.tgz"). This will re-install all required R packages with 'depend=TRUE' option, as well as bear. Good luck.

Ps. I don't know when the default of dependencies (or depend in short) option in install.packages() has been changed to 'NA'. It's default used to be 'depend=TRUE'.

All the best,
-- Yung-jin Lee
bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear
Helmut
★★★

Vienna, Austria,
2020-05-12 12:10

@ yjlee168
Posting: # 21428
Views: 4,694

utils::install.packages()

Yung-jin,

» I don't know when the default of dependencies (or depend in short) option in install.packages() has been changed to 'NA'. It's default used to be 'depend=TRUE'.

Never (see the NEWS).
The default was/is install.packages(..., dependencies = NA). The man-page states:

The default, NA, means c("Depends", "Imports", "LinkingTo").

Dif-tor heh smusma 🖖
Helmut Schütz

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
yjlee168
★★

Kaohsiung, Taiwan,
2020-05-12 17:53

@ Helmut
Posting: # 21429
Views: 4,630

depend = NA means ...

Dear Helmut,

Right and thank you very much for your info. But this depend option within install.packages(...) has two choices, one is 'NA' and the other is 'TRUE'. And you're correct, when it is 'NA'(default), means c("Depends", "Imports", "LinkingTo"). Does here 'NA' mean or imply 'FALSE' or what? If yes, why not using 'FALSE' instead of 'NA'? So I guess 'NA' is not 'FALSE' for depend option. NA is... NA.

All the best,
-- Yung-jin Lee
bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear
Andrew S
☆

2020-05-17 06:09

@ jabriges
Posting: # 21446
Views: 3,748

errors of installation bear on Windows

» > library(bear)» Error: package or namespace load failed for ‘bear’: »  package ‘bear’ was installed before R 4.0.0: please re-install it

Hi, I am new to R and to this Forum, so I am not sure if this is the correct space to "Reply" or not. However, I keep getting the same error message that Jay got above even after I deleted both R and bear from my computer (Windows) and the Re-installed R 4.0.0 and bear successfully in that order. I did that twice and still got the same error message.
I am glad to see that I am not alone on this and that you are working on a solution. Would the new version 2.8.8 also work for in Windows?
Thanks - Andrew S

Edit: Full quote removed. Please delete everything from the text of the original poster which is not necessary in understanding your answer; see this post #5. Subject line changed; this post #2[Helmut]
yjlee168
★★

Kaohsiung, Taiwan,
2020-05-17 18:43
(edited by yjlee168 on 2020-05-17 18:57)

@ Andrew S
Posting: # 21450
Views: 3,653

errors of installation bear (R v4.0.0) on Windows

Hi Andrew,

Please find bear_2.8.8.zip (built under R v4.0.0) in my Google cloud HD and download it. In addition, you should download preinst.r from SourceForge. Place the zip file and preinst.r under your R working directory. Open R console (Rgui.exe) as the system administrator, and type source("preinst.r") first, and then do("bear","bear_2.8.8.zip"). It will install all required R packages, as well as bear for you. When it finishes, close R console now and re-open it as the system admin again. Type library(bear) and go()`. Now the system shows a pop-up dialogue and ask if you want to install GTK+ driver. Click install GTK+ driver. When it finishes, bear GUI will show up on your screen. Close it and also close R console. Now you can open R console as a general user. This is pre-release for bear v2.8.8. I still work on Hotelling's T2 of outlier detection analysis (ODA) (hopefully you do not need this test right now.). Other functions in this pre-release work fine. That's it.

Thank you for posting your question here. Let me know if you still have any problem to install bear on Windows.

» I am glad to see that I am not alone on this...

Of course not.

All the best,
-- Yung-jin Lee
bear v2.8.8:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear
Andrew S
☆

2020-05-18 02:20

@ yjlee168
Posting: # 21451
Views: 3,509

errors of installation bear (R v4.0.0) on Windows

Thank you so much! so far so good, "> Congratulation! 'bear' is successfully installed." now I will put it to the test.

Edit: Full quote removed. Please delete everything from the text of the original poster which is not necessary in understanding your answer; see also this post #5! [Ohlbe]