hiratake55 / RForcecom

RForcecom provides the connection to Force.com and Salesforce.com from R
http://cran.r-project.org/web/packages/RForcecom/index.html
Other
49 stars 25 forks source link

Error in getObjectDescription #3

Open hiratake55 opened 11 years ago

hiratake55 commented 11 years ago

An error happens when retrieving some custom objects' description.

Error in data.frame(active = "true", defaultValue = "false", label = "[some proprietary info...]",  :
  arguments imply differing number of rows: 1, 0

Error occurs at this code.

xdfDFList <- sapply(xdfList, data.frame)
navaneethans1 commented 9 years ago

Hello, I just ran into this problem as well. Is there fix for it planned? Thanks!

ghost commented 9 years ago

I just ran into this problem as well.

randikegaje commented 8 years ago

Hi, I got this error attempting to retrieve the Case object from a sandbox. Is there a way around this error? Cheers...

alexbransky commented 8 years ago

I am also waiting for a fix, thanks.

BenoitFayolle commented 5 years ago

Error originates from empty fields in nested lists of xdfList. At least for me.. My quick fix is sapplying a custom function to paste those nested lists with collapse="," (~line 33 in the function script):

 xdfList <- sapply(xdf,xmlToList)
 xdfListClean <- sapply(xdfList,
                        function(x){
                          x_clean=x
                          isList=sapply(x,is.list)
                          if(sum(isList)>0)
                            x_clean[which(isList==T)]=sapply(x[which(isList==T)],
                                                             function(y){paste(y,collapse=",")})
                          x_clean
                        })
 xdfDFList <- sapply(xdfListClean, data.frame)

hope this helps