Displaying 20 results from an estimated 30000 matches similar to: "[LLVMdev] Sink Store Operations in Branch Paths?"
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")
2012 May 29
4
[LLVMdev] Aliasing Question
I just have two questions regarding the following small piece of code:
if (var > start*end) {
arr[var] = arr[var-1];
}
else {
arr[var] = arr[var+1];
}
1. Why does llvm put the address computation in the branched blocks instead
of the common dominator?
2. Why does the AliasAnalysis return MayAlias instead of MustAlias?
Thanks.
-------------- next part
2005 Jun 01
2
sink() within a function?
sink() isn't behaving as i expect, when used inside a function, eg:
x<-data.frame(F=c("O","O"))
f<-"foo.txt"
sink(f); format(x); sink(); # foo.txt looks great!
foo<-function(x,f) { sink(f); format(x); sink(); }
foo(x,f=f) # foo.txt is empty!
why is this, and how can i successfully sink() within a function?
my real function does some
2005 Jun 01
2
sink() within a function?
sink() isn't behaving as i expect, when used inside a function, eg:
x<-data.frame(F=c("O","O"))
f<-"foo.txt"
sink(f); format(x); sink(); # foo.txt looks great!
foo<-function(x,f) { sink(f); format(x); sink(); }
foo(x,f=f) # foo.txt is empty!
why is this, and how can i successfully sink() within a function?
my real function does some
2005 May 10
0
about sink and scan
Hi All r-helper,
my question like this:
I use "sink" function to get output into one file,during the sink process ,
output keep writing into this file,I want to check is there any new output
write into this file(which "sink function create"), using "scan" function to
read new output from that file.
if I use the cat with "\n" ,and
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 <-
2005 Apr 18
1
how to use sink.number()
Dear All R-helper,
my question is how to use sink.number.
if I want to label the output was sinked by sink function how should I do ?
example:
zz <- file("c:\\sinktest1.txt",open="wt")
sink(zz)
g<- 1:10
cat(g,"\n")
f<-list(1:100)
h<-capture.output(f)
cat(h)
sink()
I want there are marks in "sinktest1.txt" files, let me know the number of
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
2005 Jun 01
1
A problem on sink() and format,suggestions appreciated
Dear R users
I get a weired problem when use sink:
since the data set pretty big, I sink intermediate result for further
use,following
lines are consistently used when write data
###########################
sink("dataname.txt")
data
sink()
##########################
at first couples of run, all 10 variables are wrote to a file in following
format:
V1 V2 ....... V10
1
2010 Jul 23
1
sink function
I have the following code to write the output from auto.arima function. The
issue is not in finding the model but to divert its out put
fit to a file order_fit.txt. code runs but nothing is written to
order_fit.txt
where am I going wrong
library(forecast)
for (i in 1:2) {
filen = paste("file",i,".txt",sep="")
data <- read.table(filen)
dat1 <- data[,1]
xt <-
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]]
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])
2015 Mar 18
0
Proposing a change in the base::sink interface for type argument
It's only an illusion until one actually tries providing a vector.
> sink('foo', type=c('s','m'))
Error in match.arg(type) : 'arg' must be of length 1
The additional benefit of match.arg() which you may have not appreciated
is that it allows the user to abbreviate. That is,
> sink('foo', type='o')
is valid usage. The essential
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
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]]
2013 Oct 23
1
interrupting Sweave leaves open sink connection
Hello, if I interrupt Sweave while it's processing a file it seemingly
leaves an open sink connection that hides printed output.
Can this be changed to reset the sink on exit? I've been baffled by
this for years.
This is seen in Windows (R Under development (unstable) (2013-10-20
r64082)) and an older Linux (R version 3.0.0 (2013-04-03)).
Run the code below in two parts with a manual
2008 Sep 12
1
sink file type and Latex (Lyx)
Does anyone know what file type sink is outputting to? I've been
reverting output from R using sink and wanted to add it to my Appendix
in LaTex (Lyx) using "Verbatiminput". However, I get an error message as
LaTex is expecting an ASCII file.
Can I set sink somehow to ASCII or is there another option?
Thanks Joanne
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,]
2000 Oct 18
1
Help oo sink
---------------------- Forwarded by Pan Yuming/Extern/AAM on 18.10.2000
12:58 ---------------------------
Pan Yuming
18.10.2000 11:41
To: Prof Brian Ripley <ripley at stats.ox.ac.uk>
cc:
Subject: Help oo sink (Document link: Pan Yuming)
Dear professor,
continue with the example i used, i want to save the prediction results but when i run a R file containing the following code, it