[R] Inserting blank records in a barplot

kodar darko.petrovic.85 at gmail.com
Sun Nov 20 22:25:15 CET 2011


Hi everyone,

I currently do some statistics about my heart rate variability. I've a CSV
file which looks like this: 

 Date       Time ts_mean_RR ts_sdnn_RR ts_mean_HR ts_sdnn_HR ts_rmssd
1  20110905 07:21:50.0  1139.8298    40.3053    52.7393     2.2824  45.7958
2  20110906 07:11:37.0  1182.7333    49.1861    50.8665     2.4983  60.2329
3  20110907 07:21:31.0  1136.6028    49.4682    52.9566     2.9231  47.6896
4  20110908 07:23:53.0  1133.3475    53.7714    53.1378     3.1837  54.5673
5  20110909 07:29:21.0  1110.3194    43.1768    54.2002     2.8508  40.4889
6  20110910 09:34:02.0  1041.7597    58.5150    57.9255     4.1735  53.6907
7  20110911 11:19:24.0   994.8509    72.9786    60.7633     5.2805  63.8904
8  20110912 07:03:06.0  1133.4255    37.4771    53.0426     2.1921  46.8450
9  20110913 07:18:43.0  1165.3796    68.6048    51.8129     3.7769  65.2377

I'll plot one of these column as barplot with the 'Date' field in the
x-axis. But as some days I miss to record my heart, the days in the first
column are not always consecutive. Therefore I'm looking for a technique
with which I can visually show these blank record in my barplot diagram. I
know I can add manually these blank records directly in the CSV file but
I'll avoid this process since the CSV file is generated automatically and
can be overwritten.

I think I should first create an array of the days I want to plot and try to
match the 'Date' column with this array. But as I'm new in R I've no idea
how I can do that in a R script.

Anyone can put me on the right track or give me a simple example ?

Thanks in advance for the help. 


--
View this message in context: http://r.789695.n4.nabble.com/Inserting-blank-records-in-a-barplot-tp4089619p4089619.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list