Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Fix building segments on the fly (BuildClassificationValueSegment) #159

Closed
randyzwitch opened this issue Mar 25, 2016 · 5 comments
Closed

Comments

@randyzwitch
Copy link
Owner

A solution was provided by Tim in #129 that allowed for dynamically building segments for the segment.inline parameter. Evaluate this solution, see if it's supposed to be the same as BuildClassificationValueSegment and if so, implement Tim's solution.

FWIW - I have managed to define multiple segments in R, but it wasnt pretty.

mySegment<- list(container=list(type=unbox("hits"),
rules=data.frame(
name=c("MobileDevices",'isDomestic'),
element=c("mobiledevicetype","geocountry"),
operator=c("equals","equals"),
value=c("Mobile Phone","Australia")
)))


This will filter on both elements. I can then supply "mySegment" into the Queue* methods like:
myResults<-QueueRanked(
reportsuite.id=my.rsid
,date.from=my.dates[1]
,date.to=my.dates[2]
,metrics=myMetrics
,elements=myElements
,selected=mySelected
,segment.inline=mySegment
)
@Gitzman
Copy link
Contributor

Gitzman commented Mar 28, 2016

Using the inline segment code above and a real segment id at the same time is failing in the CRAN branch. I haven't checked if it works on master.

image

@randyzwitch
Copy link
Owner Author

Given that I haven't done any work towards this functionality, I would presume that it doesn't work

On Mar 28, 2016, at 4:39 PM, Gitzman notifications@github.com wrote:

Using the inline segment code above and a real segment id at the same time is failing in the CRAN branch. I haven't checked if it works on master.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@lcmercado
Copy link

I started getting a similar error on April 6th. Before that, I had been using inline segments by using the recommended syntaxis below. It worked like a charm for months, generating dynamic segments on the go. I didn't modify any thing. Not sure if something could have changed on Adobe's side.

This is the recommended syntaxis suggested in a previous thread

mySegment<- list(container=list(type=unbox("hits"),
rules=data.frame(
name=c("MobileDevices",'isDomestic'),
element=c("mobiledevicetype","geocountry"),
operator=c("equals","equals"),
value=c("Mobile Phone","Australia")
)))

This is my actual code that was generating dynamic segments since last year, until one week ago.

  #This is the inline segment being generated dynamically inside a for loop.
    DeepSegment<- list(container=list(type=unbox("hits"), 
                                      rules=data.frame(
                                        name=c(x[i,7]),
                                        element=c(x$Element[i]), 
                                        operator=c("equals"),
                                        value=c(x[i,2])
                                      )))

I'll try to dig into this and let you know if I find something.

@randyzwitch
Copy link
Owner Author

@lcmercado To be clear, this stopped working because you upgraded RSiteCatalyst or it just stopped working? Can you create a separate issue from this one?

In general, it would really be helpful (everyone) if we separated out new functionality requests from bug requests. Given that none of us are sharing credentials (so we can't try each others code), it's pretty hard to determine whether we're all talking about the same thing. Creating issues is free, I can always close them if they are true duplicates :)

@lcmercado
Copy link

@randyzwitch It seems the error was on my side. It was due to some global change in Locale settings that I didn't notice initially (we are using R Studio Server). Anyways, thanks for all the support and I'll keep in mind to create separated requests for enhancements or bugs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants