聆听落幕吧 关注:317贴子:46,401
  • 3回复贴,共1

关联规则分析AR

只看楼主收藏回复

RT


IP属地:上海1楼2024-04-19 08:39回复


    2楼2024-04-19 08:41
    回复
      2025-05-30 06:41:34
      广告
      setClass("Broadcast", slots = list(id = "character"))
      Broadcast <- function(id, value, jBroadcastRef, objName) {
      .broadcastValues[[id]] <- value
      .broadcastNames[[as.character(objName)]] <- jBroadcastRef
      .broadcastIdToName[[id]] <- as.character(objName)
      new("Broadcast", id = id)
      }
      # @description
      # \code{value} can be used to get the value of a broadcast variable inside
      # a distributed function.
      setMethod("value",
      signature(bcast = "Broadcast"),
      function(bcast) {
      if (exists(bcast@id, envir = .broadcastValues)) {
      get(bcast@id, envir = .broadcastValues)
      } else {
      NULL
      }
      })
      # Internal function to set values of a broadcast variable.
      #
      # This function is used internally by Spark to set the value of a broadcast
      # variable on workers. Not intended for use outside the package.
      setBroadcastValue <- function(bcastId, value) {
      bcastIdStr <- as.character(bcastId)
      .broadcastValues[[bcastIdStr]] <- value
      }
      # Helper function to clear the list of broadcast variables we know about
      # Should be called when the SparkR JVM backend is shutdown
      clearBroadcastVariables <- function() {
      bcasts <- ls(.broadcastNames)
      rm(list = bcasts, envir = .broadcastNames)
      }


      7楼2024-04-19 08:50
      回复
        为啥回不了啊


        IP属地:上海13楼2024-04-19 09:02
        回复