Questions tagged [sink]

Command in the programming language R. Sends R Output to a connection.

Command in the R programming language. Sends R Output to a connection.

Related tags:

187 questions
3
votes
1 answer

Fork-like function for Conduit

I want calculating hash of http post body and parsing it simultaneously when receiving, so I need a function like this: unionSinks :: Monad m => Consumer a m r1 -> Consumer a m r2 -> Consumer a m (r1, r2) unionSinks = ... sinkBody :: Monad m =>…
Kayo
  • 179
  • 8
3
votes
1 answer

sink() doesn't work in tryCatch block

I'm trying to close my logger instance in a finally block, as follows: logger <- file("all.Rout", open="wt") sink(logger, type="message") tryCatch({ warning('test') message("A") log('a') …
user2763361
  • 3,789
  • 11
  • 45
  • 81
3
votes
2 answers

R Language - Adding timestamp to console output

I'm using sink() for logging purposes for running R-Scripts, which works fine. *R> sink(file = paste(Log_Path, FileName), append = TRUE, type = c("output"), split = TRUE)* I'm now doing performance tests and needing to find out how long certain…
3
votes
1 answer

Removing [1] with sink and sprintf output in R

I am trying to write a series of characters and numerical values using sprintf and sink: sink("sample.txt", append=TRUE, split=TRUE) sprintf("Hello World") of course, the above is an example, so I don't have the numerical values from a data frame…
Sheila
  • 2,438
  • 7
  • 28
  • 37
2
votes
1 answer

Amazon S3 sink in serilog is not working. How to use s3 Sink with serilog?

public class program { public static void Main(String args[]) { var levelSwitch = new LoggingLevelSwitch(); levelSwitch.MinimumLevel = LogEventLevel.Information; try { var logger = new…
Sonu Tomer
  • 23
  • 2
2
votes
0 answers

altered and garbled message when using sink function

for some reason, all of the sudden, whenever i use sink function to save the console output into txt file, I start getting a weird tibble output, for example: [3m[38;5;246m[39m[23m [3m[38;5;246m[39m[23m [3m[38;5;246m[39m[23m …
David Lee
  • 21
  • 2
2
votes
0 answers

Confluent Cloud with MongoDB sink connect is not working

I'm trying to connectting confluent kafka connect with mongodb sink,but its not working as expected, it throws null pointer exception. My confluent development environment are running in GCP VM instance. And installed "confluent-hub install…
2
votes
1 answer

How to test functions that use sink(type = "message") with testthat

Within an R package I wrote a function that redirects all output from a sourced script to a log file using sink(file = "some.log", type = "output") sink(file = "some.log", type = "message") source("script.R") within the function. Now I want to test…
der_grund
  • 1,898
  • 20
  • 36
2
votes
1 answer

capture warnings with capture.output

I am having problems using capture.output() and I can't figure out why, since it is for the most part just a wrapper for sink(). Consider this trivial example using sink(): foo = function() warning("foo") f = file() sink(f, type =…
mikeck
  • 3,534
  • 1
  • 26
  • 39
2
votes
1 answer

Serilog Seq Sink with Docker is not capturing events

I am running a web api and console apps on Net Core 3.1 on Windows 10 Professional. I have sinks for console, text file, json file, mssql, and seq. They each log all events, except seq does not log any event. I installed Docker with the following…
David Stevens
  • 173
  • 1
  • 1
  • 8
2
votes
0 answers

Kafka-Connect HDFS Sink Connector NullPointerException

While we are trying Kafka Connect for HDFS Sink based on the Confluent blog article: https://docs.confluent.io/current/connect/kafka-connect-hdfs/index.html, we are met with Java.lang.NullPointerException Following information are attached in the…
2
votes
1 answer

Message function in R not writing to text file / print message to stdout

I'm writing some text to R console using print(), cat() and message() functions. I wish to collect console outputs into a text file, so I sandwiched the code between a pair of sink() functions. Final code looks like: sink("output_filename.txt")…
Ashrith Reddy
  • 1,022
  • 1
  • 13
  • 26
2
votes
1 answer

What is the difference between using Sink and Pipe with Streams in Dart?

import "dart:async"; import "dart:html"; void main() async { InputElement addStream = querySelector("#addstream"); Stream aStream = _someStream(); StreamController sc = StreamController(); sc.stream.listen((e) => print(e)); …
richalot
  • 4,491
  • 7
  • 24
  • 27
2
votes
1 answer

Save a file via sink function in shiny server?

I have a shiny app to generate a .txt file to download. In addition, I would like to keep a copy of the file that users generate in my shiny server. the server function looks like : server <- function(input, output, session){ data_gen <-…
Haribo
  • 2,071
  • 17
  • 37
2
votes
1 answer

Write list of lists into a file in R/Shiny

I have a list of lists which I would like to write into a file (.txt or .xlsx) in Shiny. C = list(listA = list(1:3, structure(1:9, .Dim = c(3L, 3L)), 4:9), listB = list(c("t1", "t2", "t3"), structure(c("p1", "p2"), .Dim = 2:1))) In R, I could…
Haribo
  • 2,071
  • 17
  • 37
1 2
3
12 13