Wednesday, May 28, 2025

Fedora Rstudio with Electron

 Some time has passed since RStudio's transition to Electron. I use Rstudio almost daily on Fedora. It became not as stable as it was before this transition to Electron. RStudio can became unstable especially on an external screen on my laptop and together with issues from Libreoffice. 

Tuesday, November 5, 2024

Fedora 41 Rstudio change

 After upgrading to Fedora 41, I was surprised that RStudio has been deleted. It was  RStudio's transition to Electron from Qt which made Fedora developers exclude RStudio from official repos. So from now on one needs to install RStduio from copr repo maintained by iucar at this address.

Saturday, April 27, 2024

Fedora 40 RStudio startup error

 After upgrading my laptop to Fedora 40, I started RStudio and tried to install an R package. The install was failed with an error message saying

libicui18n.so.73: cannot open shared object file: No such file or directory

After doing a quick search, I thought this is a simple lacking or unlinking issue and thought creating a symbolic link will solve. I tried to understand what libicu packages were installed in my Fedora laptop. There seemed a libicu package installed. 

After some more search on my computer, I realised libicu73 package is a different package than that libicu installed on my laptop. Installing libicu73, finally solved the error I was getting.

Thursday, December 21, 2023

Camel shadow of a boxplot

Behold, from this moment onward, I shalt call camel shadow of the boxplot as its corresponding histogram.



Tuesday, August 9, 2022

RStudio knit to pdf option disappearance

 Oh my goodness. I am totally surprised when I learned how this problem that was making me feel drowned (exaggeration, of course) since yesterday has a simple solution. Actually I was trying to solve this problem by trying to convert .rmd files to .md and then to .pdf.(ie, knitting to pdf manually). I was getting erroneous outputs for some reasons still I lack to understand. 

Then I selected to change my approach to the problem and make a naive search which looks for that lacking "Knit to pdf" menu option. And the first link I found after my web engine search worked like a charm.

I learned that all I needed to do was to indent pdf_document and similar html_document commands after output: declaration. And a magic happened, knit to pdf menu option appeared. Of course, I have had a tex distribution installed on my computer beforehand.

I am now happy that my beloved pdf documents are knitted as was expected.

Tuesday, June 16, 2020

RStudio on Fedora

Fedora has 3 different RStudio packages on his repo. One is a base package named rstudio. Second is what you looking for rstudio-desktop and the last is a web based RStudio rstudio-server. Here is a list that comes
$sudo dnf search rstudio
Last metadata expiration check: 0:24:10 ago on Tue 16 Jun 2020 01:26:32 PM +03.
=========================================================== Name & Summary Matched: rstudio ============================================================
rstudio.x86_64 : RStudio base package
R-rstudioapi.noarch : Safely Access the RStudio API
rstudio-server.x86_64 : Access RStudio via a web browser
================================================================ Name Matched: rstudio =================================================================
rstudio-desktop.x86_64 : Integrated development environment for the R programming language

Sunday, May 10, 2020

MethComp package on Fedora

Recently I needed to install MethComp package on my Fedora desktop. After shooting an install.packages command it complained about a nonzero exit status saying that "ERROR: dependency ‘rjags’ is not available for package ‘MethComp’".
I urged for rjags package in Fedora repos, and couldn't find one. Therefore it was the time to make my hands dirty. rjags has a sourceforge page from which I downloaded version 4.3.0 tarball and installed it. Now it was to install rjags package which is a dependency to MethComp. This took some time to understand my new problem which is the error when I try install.packages("rjags"). Now R was complaining that "pkg-config file for jags 4 unavailable, Consider adding the directory containing `jags.pc` to the PKG_CONFIG_PATH environment variable".
After some search I found out that the jags.pc file was under the folder "/usr/local/lib/pkgconfig/", but I didn't know how to show this file to pkg-config from within R. I also recognised that some other .pc files are located in the folder "/usr/lib64/pkgconfig" on my system. So I took a shortcut and copied jags.pc file into this default folder of pkconfig. Lastly, with a command like
install.packages("rjags",configure.args="--enable-rpath")
I was able to install rjags into my system and hence MethComp.

Wednesday, February 14, 2018

SAS Proc Glimmix does everything!

Yes, it is a very unifying procedure of many different analyses (hence the name).
It can handle all the models included in Generalized Linear Mixed Models. That means all statistical analyses appeared in many elementary textbooks are supported.
It is a fantastic procedure that I became to use everyday. Together with powerful LSMESTIMATE statement it is a real giant.

An update: I was looking for calculating odds ratios in a logistic regression model where an interaction term is included. Wow, GLIMMIX has an option oddsratio in a lsmeans statement (possibly in lsmestimate too) which does the job perfectly. With slicediff, ilink and cl options, that was just what I was looking for. Awesome. GLIMMIX will be my first choice of procedures from now on.

Wednesday, July 12, 2017

Ordinal logistic regression traps

I have seen this post and that post about ordinal regression. It is strange to learn that SPSS and Stata uses a different modeling approach than SAS and Minitab. Also the SAS way explained in the second post is very important to remember when doing ordinal regressions with SAS.

Wednesday, February 15, 2017

SAS contrasts and lsmeans

I found a good document about contrasts and lsmeans here

SAS Class parameterization

I noticed that some SAS procedures do not provide some parameterizations like using a keyword like param=GLM. Then those procedures(GLM, MIXED, GLIMMIX, PROBIT, and ORTHOREG) only provide GLM parameterization and usage of "ref" keyword in a class statement as described in here.

Saturday, October 29, 2016

SAS high resolution image output and CMYK with Gimp

I was struggling with generating a 600dpi image output from SAS. It was a ROC curve from a logistic regression model that is needed to be published as CMYK at 600dpi resolution.  I tried different output destinations like PDF, RTF and HTML. It was either impossible to extract the image from embedded destinations or the resolution was unsatisfactory and seemed not to be refined. After some reading, I found out that it is possible to output each image separately (since the output of logistic regression contains many images). I have used the following code to generate high resolution images into a folder I specified
ods listing gpath="C:\Users\path" image_dpi=600;
ods graphics  on/ reset=all imagefmt=png  imagename="anyname";
proc logistic data=mydata plots(only)=(roc);
model Dependent(event='Present') = Independent ;
roc 'Variable' Independent ;
run;       
ods graphics off;
ods listing close;
I actually needed tiff images but all the time when it generates it reported a java exception about memory size exceed. I had enough ram and memory allocated, but I could not find a solution. Later I decided to try another format, png and it worked. I got high resolution png images and converted them nack to tiff using Gimp.
But the story did not end here because the images should have had CMYK color scheme. I was using Gimp, a free image manipulation program and it was not easy to fine-tune Gimp to make CMYK outputs.
After some search I found out that there is a plugin called seperate+ which lies in here . I recommend installing separate+-0.5.8+lcms2_win32_bin.zip file because it does not require libtiff3.dll which is a needed file if you install the other zip file. But installing it is not enough, you need to find some icc profiles for CMYK scheme. Adobe offers such files, an internet search can reveal. After installing them into correct folder which is inside system32 folder in Windows, one can use them together with seperate plugin and convert a RGB image to CMYK using Gimp.

Tuesday, June 21, 2016

Testing homogenity of variances

The statistician Box once said “To make a preliminary test on variances is rather like putting to sea in a rowing boat to find out whether conditions are sufficiently calm for an ocean liner to leave port” (1953,Biometrika, 40, p.333).