Bharath V Posted December 19, 2023 Share Posted December 19, 2023 # Sample SDE DataLibrary (sqldf)inp<-data.frame()inp<-SDEinp_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 groupFor (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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now