Working with built-in datasets in R

This is a quick cheat sheet of commands for working with built-in datasets in R.

R has a number of base datasets that come with the install, and there are many packages that also include additional datasets.  These are very useful and easy to work with.


> ?datasets                                  # to get help info on the datasets package

> library(help=”datasets”)     # provides detailed information on the datasets package, including listing and description of the datasets in the package

> data()                                       # lists all the datasets currently available by package

data(package = .packages(all.available = TRUE))  # lists all the available datasets by package even if not installed

> data(EuStockMarkets)            # loads  the dataset EuStockMarkets into the workspace

> summary(AirPassengers)      # provides a summary of the dataset AirPassengers

> ?airquality                                    # outputs in the Help window, information about the dataset “airquality”

> str(airmiles)                                 # shows the structure of the dataset “airmiles”

> View(airmiles)             # shows the data of the dataset “airmiles” in spreadsheet format




Working with special character letters in Oracle database (grave accent, acute accent, circumflex accent, tilde, and umlaut)

We have some external data feeds that we receive as csv files, and we load them into our data warehouse and process them.    It turns out that data values that include special characters were getting messed up at some point before or during the load to the Oracle database.

In this post, I will go over one way to select, insert or update data values that contain these special characters.  The “special characters” I am referring to are the grave accent, acute accent, circumflex accent, tilde, and umlaut.

The most common one we come across is the “acute accent” which is present in words such as café or entrée (accent over the e in both words).

If you want to insert these words without the accents, into an example table, WORDS, with a single column, SPECIAL_CHAR_WORD, it would simply be:

insert into WORDS (SPECIAL_CHAR_WORD) values ('cafe');
insert into WORDS (SPECIAL_CHAR_WORD) values ('entree');

But if you want to insert these words with the accents, then you would need to do this:

insert into WORDS (SPECIAL_CHAR_WORD) values UNISTR('cafe\0301');
insert into WORDS (SPECIAL_CHAR_WORD) values UNISTR('entre\0301e');

To select the word café with the accent, run this statement:

select UNISTR('cafe\0301') from dual;

Once a column value is already in a table in the proper format, you can simply select the column name using a normal SQL select statement, and the output will show properly (maybe with just the need for some formatting as you will later in the article).

And for update – to update the word entree with the word entrée, run this statement:

update WORD set SPECIAL_CHAR_WORD = UNISTR('entre\0301e') where SPECIAL_CHAR_WORD = 'entree';

To see several special characters (grave accent, acute accent, circumflex accent, tilde, and umlaut), run this statement …

select UNISTR('bare\0300ge') from dual   -- barège    -- grave accent
select UNISTR('entre\0301e') from dual   -- entrée    -- acute accent
select UNISTR('pa\0302turer') from dual  -- pâturer   -- circumflex accent
select UNISTR('jalapen\0303o') from dual -- jalapeño  -- tilde
select UNISTR('fu\0308r') from dual;          -- für    --umlaut

… the output would look like this … which seems not quite right …

Add the COMPOSE statement (which is just for formatting) as shown below …

select COMPOSE(UNISTR('bare\0300ge')) as SPECIAL_CHAR_WORD from dual   -- barège    -- grave accent
select COMPOSE(UNISTR('entre\0301e')) from dual   -- entrée    -- acute accent
select COMPOSE(UNISTR('pa\0302turer')) from dual  -- pâturer   -- circumflex accent
select COMPOSE(UNISTR('jalapen\0303o')) from dual -- jalapeño  -- tilde
select COMPOSE(UNISTR('fu\0308r')) from dual;     -- führer    --umlaut

and the output will look like this …


As  you can see, the key to this is knowing the code for the special character you need, and then using the UNISTR function to add the special character to the rest of the text, and if necessary, use COMPOSE for display purposes.

Thanks for reading. Hope you found this helpful.

Direct Links to various OBIEE User and Administration Presentation functions

These are some direct links to various OBIEE User and Administration functions.  These can be useful to know for efficiency and at times can also be useful for debugging security.

To go directly to “Home Page”

To go directly to “Dashboard”

To go directly to “Manage Privileges”

To go directly to “Manage Catalog Groups”

To go directly to “Manage Sessions”

To go directly to “Manage Agent Sessions”

To go directly to “Issue SQL”

To go directly to “Manage Map Data”

To go directly to “Manage BI Publisher”

Using Custom Images in OBIEE 10g & 11g

In both OBIEE 10g and 11g, custom images need to be placed in 2 folders before use within reports/dashboards.

 In OBIEE 10g, images need to be placed in:

(1)     $BIHOME\oc4j_bi\j2ee\home\applications\analytics\analytics\res\s_oracle10\images

Windows directory path example:

Linux directory path example:


(2)    $BI_HOME\web\app\res\s_oracle10\images

Windows directory path example:

Linux directory path example:


In OBIEE 11g, images need to be placed in:

(1)    $OBIEE_FMW_HOME\user_projects\domains\bifoundation_domain\servers\bi_server1\tmp\_WL_user\analytics_11.1.1\7dezjl\war\res\s_blafp\images

Windows directory path example:

Linux directory path example:


(2)    $OBIEE_FMW_HOME\Oracle_BI\bifoundation\web\app\res\s_blafp\images

Windows directory path example:

Linux directory path example:

Note: you may also create or use directories at the same level or below the images directories under the s_oracle10 (in 10g) and s_blafp (in 11g) directories, for example, if you wanted to put all your custom images into a separate directory.

Then in Answers / Analysis, you would reference the image as shown below.

Edit the Column Properties:

Then, in the Style tab, within the Cell area, click on the Image object…


Then in the Graphics dialog, select “Custom Image” and enter  fmap:images/your_custom_image.jpg.

Note: If your images are in a directory other than the images directory, you need to supply that path, but still starting below s_oracle10 or s_blafp directories.

And set the Image Placement property. Images Left (shows the Image to the left of the column data), Images Right (displays the image to the right of the column data), Images Only (displays the image only – no column data)

If new images were placed into the directories after the last BI Server / Presentation Server restart, you will need to restart the BI Server and Presentation Server for the images to be displayed.

Oracle Business Intelligence Enterprise Edition 11g (OBIEE 11g) Books

There are a few Oracle Business Intelligence Enterprise Edition 11g (OBIEE 11g) books on the market currently.  For quite sometime, not many books have been available for OBIEE, and in particular OBIEE 11g.

Anyway, below are 2 books that I think are worthwhile, and 1 that you might want to look into … the links take you to Amazon, and shows the paperback versions. But you can easily navigate to the Kindle versions from there. 

Oracle Business Intelligence Enterprise Edition 11g: A Hands-On Tutorial by Christian Screen, Haroun Khan and Adrian Ward (Jul 19, 2012)

Oracle Business Intelligence 11g Developers Guide by Mark Rittman (Sep 18, 2012)

Implement Oracle Business Intelligence (Volume 1) by Mr. Riaz Ahmed (Mar 30, 2012)

I read pretty much all of the Screen/Khan/Ward book and found it to be good, but experts might find it a bit basic.  I just started reading the Rittman book, got through the first 3 chapters, and so far it has been very good. 

I have not read the Ahmed book because it is not yet available on the Kindle, and that’s my preferred way of buying books due to its convenience. But it might be worthwhile checking it out.

Happy Reading!

EVALUATE_SUPPORT_LEVEL inside NQSConfig.INI is not set

If you use the Oracle EVALUATE function in OBIEE, then you will need to set a parameter in the NQSConfig.INI file in OBIEE 11g.

If you get this error below, then you are using the EVALUATE function somewhere inside OBIEE (in one of your analyses/requests) and the parameter needs to be set appropriately in the NQSConfig.INI file.

State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred.
[nQSError: 43113] Message returned from OBIS.
EVALUATE_SUPPORT_LEVEL inside NQSConfig.INI is not set to support EVALUATE. (HY000)

This is what you need to do to correct the problem… 

Edit the NQSConfig.INI file, located at: OBIEE_INSTANCE/config/OracleBIServerComponent/coreapplication_obisn

This is what you will see by default in the config file…
# 1: evaluate is supported for users with manageRepositories permssion
# 2: evaluate is supported for any user.
# other: evaluate is not supported if the value is anything else.

Change the parameter as follows: EVALUATE_SUPPORT_LEVEL = 2;

Save and restart the BI Server.  Your requests should work fine now.

Welcome to OBIEEpedia!

Welcome and thank you for visiting the OBIEEpedia blog!

This blog is dedicated to covering topics related to Oracle Business Intelligence Enterprise Edition (OBIEE) and closely related technologies, such as Data Warehousing, Business Intelligence in general, Oracle Business Intelligence Applications (OBIA), and more.

You are invited to learn, post comments, and share content.