Time Series Histogram Generation in R Studio

Recently I have started learning R because of the powerful number of tools that are part of the R eco-system for data analysis.

Previously, doing a histogram of a time-series was a painstaking process.

I'm happy to announce that today, I have discovered the power of the hist function for time data as POSIXlt class data.

Here is the basic code:

# Read the data in
Data <- read.csv("~/MyDataSource.csv", header=FALSE)
# Convert the timestamps from the csv file into POSIXlt date time structure
Data$V1 <- as.POSIXlt(Data$V1, format="%Y-%m-%d %H:%M:%S")
# Display the histogram
hist(Data$V1, breaks="hour", xlab="Date / Time")

This assumes that the first column contains date and time data formatted like: 2016-02-05 09:04:24.967 while reading the dates in from the default timezone of the system.


Thanks R Studio for making my life easier!

T-SQL Table Valued Functions and Linq-to-SQL

I noticed that calling a T-SQL table value function that does not explicitly define the return table type causes the Linq-To-SQL code generation engine to create an incorrectly formed SQL request.

When querying the SQL functions listed at the bottom of the post with these statements, the first will not work and the second will work correctly.


foo(1).Dump();
foo2(2).Dump();


The first function (from the two listed below) will have SQL generated that looks like

-- Region Parameters
DECLARE @p0 Int = 1
-- EndRegion
SELECT [t0].@Max AS [Max]
FROM [dbo].[foo](@p0) AS [t0]

which is incorrect. If you inspect the SELECT statement closely you will see [t0].@Max and the @ symbol should not be there.

The following SQL function definitions are referenced above:

Fwd: ID thieves' new hangout: file-sharing software - MSNBC.com

If you are using file-sharing software or even thinking about using it, you need to read this msnbc article.

Latest post from: ID thieves' new hangout: file-sharing software ( http://redtape.msnbc.com/2007/11/id-thieves-new-.html)