How to use Indexing Operators in List in R
R has main 3 indexing operators. They are as follows :[ ] = always returns a list with a single element.[[ ]] = returns a list element$ = returns elements from list that have names associated with it,...
View ArticleIntermediate Proc SQL Tutorial
This article explains practical application of SQL queries with examples.Example 1 : Creating trend variablesSample Datasetdata example1;input ID Months Revenue...
View ArticleCombining Tables Vertically with PROC SQL
This tutorial explains how to combine / append data sets vertically with PROC SQL.Create data sets in SASdata dat1;input x y;cards;161617647687;run;data dat2;input x z;cards;1 54 23 46 46 55...
View ArticleARIMA Modeling with R
Data Set DescriptionManufacturer’s stocks of evaporated and sweetened condensed milk (case goods), Jan 1971 – Dec 1980Load Datalibrary(forecast)library(fpp)# Plot time series...
View ArticleRetain Statement in SAS
Create data in SASdata abcd;input x y;cards;1 251 281 272 232 352 343 253 29;run;Generate Serial NumberThe RETAIN statement simply copies retaining values by telling the SAS not to reset the variables...
View ArticleR : Convert categorical variable to numeric
In classification models, we generally encounter a situtation when we have too many categories or levels in independent variables. The simple solution is to convert the categorical variable to numeric...
View ArticleSend Email from R
In R, there is a package named mailR that allows you to send emails from R.Send Email with RR Code : Send Email from...
View ArticleWish Christmas with R
This post is dedicated to all the R Lovers...Flaunt your knowledge of R programming in your peer group with the following code and ask them to turn on computer speakers before running the code.Wish...
View ArticleMixed Regression Modeling Simplified
Mixed-Effects Regression ModelingMixed effects models work for correlated data regression models, including repeated measures, longitudinal, time series, clustered, and other related methods.Why not to...
View ArticleMarket Basket Analysis with R
Market basket analysis explains the combinations of products that frequently co-occur in transactions. For example, people who buy bread and eggs, also tend to buy butter as many of them are planning...
View ArticleSAS Macros Made Easy
This post explains SAS macro programming with practical examples.What are MacrosMacros are used to automate the repetitive task. It can make your work faster by automating the task that requires...
View ArticleSAS : Many to Many Merge
In SAS, many-to-many merges are handled very differently via Data Step and PROC SQL.Let's take an example -Suppose you have two data sets. You want to merge both the data sets but there are duplicate...
View ArticleUse of Multiple SET Statements
In SAS, you can perform one-to-one reading with the help of multiple SET statements. It combines observations from two or more data sets into a single observation in a new data set.DATA dat1;INPUT id...
View ArticleZip / Unzip SAS Datasets
This post explains how to zip or unzip SAS data sets.SAS : Zip / Unzip1. Zip SAS Dataset with GZIPsystask command "gzip 'C:\Users\Deepanshu\Downloads\crime.sas7bdat'" wait taskname=zip status=check...
View ArticleTranspose Data in R
In R, we can transpose our data very easily.R Code : Transpose Datadata <- read.table(text="X Y Z ID12 2012-06 566 ID1 2012-06 10239...
View ArticleCluster Analysis with R
Cluster AnalysisFinding similarities between data on the basis of the characteristics found in the data and grouping similar data objects into clusters. It is an unsupervised learning technique (No...
View ArticleValidate Cluster Analysis
The pre-validation steps of cluster analysis are already explained in the previous tutorial - Cluster Analysis with R. Clustering validation process can be done with 4 methods (Theodoridis and...
View ArticleSAS Arrays and DO Loop Made Easy
SAS Arrays : IntroductionIt provides a simple, appropriate way to process a group of variables in a SAS DATA step.SyntaxArray array-name {number-of-elements} list-of-variables;Note: You can use [ ] or...
View ArticleFirst. and Last. Variables
First. and Last. VariablesTwo automatic variables, FIRST.variable and LAST.variable can be created if we use a by statement along with a set statement in a data step.FIRST.VARIABLE assigns the value of...
View ArticleExcel VBA : Concatenate Text Based on Criteria
This article explains how to concatenate text based on unique ID values.The input sample data is shown below -Combine Rows Based On ConditionDownload Excel WorkbookStep I : Extract Unique IDsCheck out...
View Article