• Load files in R with specific encoding

    When working with flat files, encoding needs to be factored in right away to avoid issues down the line. UTF-8 (or UTF-16) is the de facto encoding that you hope to get. If the encoding is different, pay attention on how you load the file into R.

  • Distinguish between a base and a SPD library

    In SAS, a library engine is an engine that accesses groups of files and puts them into a logical form for processing. The engine used by default is the base engine. In addition, you may come across other engines, such as the SPD engine.

    The SAS Scalable Performance Data Engine (SPD Engine provides parallel I/O as each SAS dataset is split over multiple disks. The structure of this engine allows a faster processing of large data.

    A common production set-up may define different libraries with different purposes, and therefore different engines. A library with the base engine may be used for ad-hoc reporting and small data transformation, while the library with the SPD engine may be used to store a large data mart. From a user’s perspective, the layer provided by the SAS meta-data server hides the underlying engines used by the various libraries. It is however useful to validate the type of engine being used without relying on the IT department.

  • Using XSL to convert a KML file to a static Google Map image

    Maps provided by Google can be embedded into a website using three approaches. The first approach consists in simply creating a custom map via the custom map editor. It allows you to add placemarks, draw lines and shapes, and publish your map for public consumption. The map can be then embedded in your website.

  • Scroll quickly to a column with SAS Entreprise Guide

    Finding a specific column while browsing a wide table with SAS Entreprise Guide may be a little bit tricky.

  • Linking to a folder in SharePoint

    Linking documents in SharePoint is a quite common task. For example, a local PowerPoint presentation may contain a link to a Word document stored in SharePoint. There may be also cases where the author needs to refer not only to a single document, but also to a folder stored in SharePoint. It turns out that the process of retrieving the URL of a folder in SharePoint is different than the method used for a document.

  • Coalesce in SAS

    Coalescing refers to the process of checking the value of each input parameter in the order in which they are listed and returns the first non-missing value. In SAS, the behavior of each of the coalesce functions depends on the processing context, either in a data step or in a PROC SQL statement. These differences are important to acknowledge, especially when the code is migrated from PROC SQL to a data step.

  • Slide Number in PowerPoint

    Recently, I was working on a PowerPoint presentation based on a specific template from a client. As I was about to print the deck, I realized that the slide numbers were missing. As I struggled to figure out how to make the slide number to appear on all the slides, I thought it would be good to share here my experiences. The illustrative screenshots have been taken from PowerPoint 2003. The approach should be similar for more recent versions of PowerPoint.

  • Formatting scaled numbers

    Standard formatting in .NET is sometimes not enough to fill specific requirements. For example, when high-level financial reports from big corporations need to be produced, the numbers dealt-with are generally around hundred of millions. Consider the following report where the scale and the currency (M$) is being displayed in the row header.

  • MWSnap Review

    MWSnap Icon

  • Order returned by GetMethods

    When calling the GetMethods function which lists the methods for a given type, we should keep in mind that this function does not return methods in a particular order. More specifically, the methods are not necessarily in the same order it has been declared in the source code. This discrepancy is due to some caching performed by the .NET Framework for better performance as explained in a post by Haibo Luo. This article is aimed at outlining solutions to order the methods returned by GetMethods in the declaring order.