The TIBCO Platform is a real-time, composable data platform that will bring together an evolving set of your TIBCO solutions - and it's available now!
A chart showing the TIBCO Platform vision
Jump to content
Forums
Ask questions and gain insight from discussions

Trying to create the Sampled data, Using R script, But R script through an error?


Bharath V

Recommended Posts

# Sample SDE Data

Library (sqldf)

inp<-data.frame()

inp<-SDE

inp_int=inp%>% filter(between(inp$Case_Created_Date,startdate,enddate))

inp<-sqldf(“select Case Number,Follow-up Number,Product Name,Country”)

Inp<-unique(inp)

finalsampleddata<-data.frame()

grplist= unique(inp$Importing_User_Site)

#loop over the sampling groups and sample fro each group

For (I in 1 : length(grplist))

{  table_to_sample<-data.frame(subset(inp,Importing_User_Site==grplist))

samplefreq= celling(nrow(table_to_sample)/(100/samplepercent))

Sampled<-sample_n(table_to_sample,samplefreq)

Finalsampleddata<-rbind(finalsampleddata,sampled)

}

#names (finalsampledata) <-gsub(“\.”,” “, names(finalsampleddata))

outputSDE<-finalsampleddata

Above R script using the sampling data, Input and output parameters assigned as per the document properties. I need SDE Sample Data table. Attached the error Screenshot below, Please provide the answer where i m wrong.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...