similar to: how to use sink.number()

Displaying 20 results from an estimated 10000 matches similar to: "how to use sink.number()"

2003 Sep 16
3
Question in Using sink function
Could anyone please explain to me why the following writes nothing into "all.Rout" file? If the "for" loop is removed, t.test output can be written into "all.out". Thanks in advance. Minghua Yao ...... zz <- file("all.Rout", open="wt") sink(zz) for(i in 1:n) { Cy3<-X[,2*i-1]; Cy5<-X[,2*i]; t.test(Cy3, Cy5)
2006 Jul 23
1
Iterated Data Input/Output with Random Forests
Hi, I am currently writing code to input a few thousand files, run them through the Random Forests package, and then output corresponding results. When I use the code below: zz<-textConnection("ex.lm.out", "w") sink(zz)
2001 Jan 02
1
sink() does not seem to release the file
I run Win2000, and when I try to write to a file and later use it it seems that R 1.02.0 has a firm grip on it: > version _ platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 2.0 year 2000 month 12 day 15
2000 Dec 19
2
Problem with sink() in 1.20 on Windows (PR#779)
When I use sink(filename) to save the results of the run, the file does not seem to be closed or released back to the OS after I issue the "sink()" command. Here is a baby example: sink("test.txt") tdta <- data.frame(x = x <- 0:10,y = 2 * x + rnorm(11)) print(summary(lm(y ~ x, data=tdta))) sink() At this point (even after refreshing the Explorer window) the filesize
2003 Jan 13
4
Ideas needed on automation of R
I need some guidance on what is the best way to automate R I am aware of Rterm. First question: Is it true that R is not currently OLE accessible under Windows 2000? Second question: Is there an R command that echoes all R Console results to a run log system file? My first attempt to write a run log file is the example from the R Data Inport/Export documentation. > zz<-
2008 Sep 24
2
Add "title" in sink output and possibility of plot-like output for text
Hello, I have been using sink to create text file outputs. >sink("summ_model1and2.txt") > summary(model1) > summary(model2) > sink() Q1: Is there a way I could add a line of the text above the summary to act like a title? Also, I have been using the following to save plots from the lm function: > pdf("small.bin.ENN_MN_withQ.pdf") > par(mfrow = c(2, 2), oma
2005 May 16
1
sink stack memory??
Dear R-mailers I want to store data in a seperate file named 'XYZ' so I uses sink function for it i runs the loop , say 100 times, and so every of the 100 times the function is called the result must go to the file. But after soem time of running it says " Error in sink("C:/XYZ", append = TRUE) : sink stack is full " but i have enough memory on the disk for
2014 Apr 29
0
SUGGESTION: Option to have menu() and select.list() to use stderr (or even "prompt" output)
SEND TO STDERR: Currently utils::menu() and utils::select.list() with graphics=FALSE queries the user via the standard output (stdout). I'd like to suggest to do this via standard error (stderr) instead, or at least have an option to choose which output stream. If they would send to stderr, they could also be used in various report generators that capture stdout and redirect to the generated
2007 Aug 07
1
sink behavior
There is a package called 'safe' that produces an object which I can only write to a file using the sink() function. It works fine if the sink() command is not inside of a function, but it does not write anything to the file if the command is within a function. Sample code: # Using a matrix because as a simple example. dumpMatrix = function(mat) { sink(file = "mat.txt")
2010 Jul 16
3
Help with Sink Function
iterations <- 100 nvars <- 4 combined <- rbind(scaleMiceTrain, scaleMiceTest) reducedSample <- combined reducedSample <- subset(reducedSample, select = -pID50) reducedSample <- subset(reducedSample, select = -id) for (i in 1:iterations) { miceSample <- sample(combined[,-c(1,2)],nvars, replace=FALSE) miceSample$pID50 <- combined$pID50 miceTestSample <-
2008 Oct 13
4
Add notes to sink output
Hello, How can I add notes (i.e. text) to a sink output? sink("test.txt") #This text will describe the test summary(x) sink() How can I add that text above to the sink output? Thanks, Michael [[alternative HTML version deleted]]
2007 Jul 05
2
sink() and source()
hello, I have a problem running a R script actually I'm using source() and sink() and it doesn't work source("T:/agents/melyakhlifi/R/essai_rep.r") to execute a file and the file contain sink("T:/agents/melyakhlifi/R/sortie.html") cat("<html><body><pre>\n") matrix.merge2 cat("</pre></body></html>\n") sink() I
2003 May 07
3
Sink for a subdirectory
Hi, how do I sink output to a subdirectory under which R is running? For example, suppose R is running in ~me and I would like to sink output to ~me/Subdir/filename. The obvious sink( "Subdir/filename" ) does not seem to work. Thanks very much.
2012 Nov 09
2
sink() doesn't work
Oftentimes I want to make outputs to be displayed on the R console. However, after I execute a program with a sink command in it the R console becomes unresponsive. Meaning that the following occurs in R console: > source("Program_containing_sink.R") > a<-1 > a > >sink() >a > R help says that sink() will bring output back to the console but i's not
2008 May 01
2
using the sink() function in a for-look
hi all, i wanted to use the sink function to sequentially output regression summaries within a for-loop. i must have something wrong somewhere (or be using the sink function incorrectly), but can anyone help? the code I am using is: where data.x is a data.frame of independents, and data.y is a data.frame of dependents. > for (i in 1:length(data.y)){ > taxa.i <- names(data.y[i])
2003 Jan 13
3
sink() & windows printing
I used sink() a lot under linux with no problems. Under windows 2000 & using R 1.5.1, I do the following: - use sink() to direct ouput to a file - use sink() again to direct output to screen - print the file (to a network printer) PROBLEM: the file stays spooled infinitely at the printer. Sometimes the spooling gets translated into a printer error. The only way to get any printing working
2009 Mar 28
2
Output an RWeka model via sink
When I sink the output of an RWeka model to a text file, the output file appears empty: library(RWeka) model = LogitBoost(Species~.,data=iris) print(model) sink("output.txt") print(model) #file output.txt is created, but it is blank sink() Am I doing anything wrong? [[alternative HTML version deleted]]
2010 May 21
2
Getting sink to work with “message” on R 2.11.0 - what did I miss?
Hi all, I am trying to use type message with sink, like this: sink("all.Rout", type="message") 1+3 sink() readLines(con = "all.Rout") So to get the following output: > 1+3 [1] 4 Obviously this doesn't work. I tried some variations (based on the explanations in the help) but am missing something on how to make it work. Any suggestions? (p.s: I need
2007 Mar 08
1
sink with R-code
I have the same question that Eusebio had: Is there a function similar to "sink" that redirect also R code to a file that is: sink("R001") x <- c(2,-6,-4,8,5,4,1,3,4,-9,0,1) A <- matrix(x, ncol=3) A A.prima <- t(A) A.prima dim(A) dim(A.prima) sink() create a file "R001" with contents: ------------------------------------------ [,1] [,2] [,3] [1,]
2004 Mar 25
1
Error : sink stack is full
Hello, I have implemented a method which uses sink to follow the progression status of an iterative process (Below is part of the code) I have already used such kind of code with no problem. Today, I get a "sink stack is full" error. I wonder if it could be linked with the fact that my .RData has a large size (around 7 Mo) ??? I hope that someone can help me ... Thanks in advance