Displaying 20 results from an estimated 10000 matches similar to: "print comment lines on `sink'ed files?"
2003 Dec 26
2
OC curve in "Quality Control"
Dear all,
Can anyone please help me about any of the following questions:
--------------------------------------------
1. How can i find "factorial" of any number in R? I tried
> prod(170:1) # to find factorial of 170 or 170!
Is it the only procedure - or R has any better process / operational
character to calculate factorial? Also, is it possible to calculate
factorial of 500? Or
2003 Dec 22
3
runif and sample with reproducibility
Hello,
I would like to sample a population but the result needs to be
reproducible, using 'runif' or 'sample' is the good way to do it but I
can't manage to make the results reproducible even with the 'set.seed'
function.
My aim is that th call to 'sample(1:100,10)' gives always the same result,
how can I do that?
Thanks!
Eric Esposito
2003 Nov 05
3
map does not display maps, MacOSX
Hi,
I installed the maps and mapdata libraries on my R-1.8.0 on
MacOSX 10.2.8 (jaguar on a powerbook G4), and failed to make the
map function work properly:
R : Copyright 2003, The R Development Core Team
Version 1.8.0 (2003-10-08)
[...]
> library(maps)
> map()
Error in file(file, "r") : unable to open connection
In addition: Warning message:
cannot open file
2003 Oct 09
4
Previous Commands
Dear All,
yesterday I took the R-1.8.0-source file and compiled it on my own. As I am
using Linux just for a couple of weeks, it was my first compiling session
with ./configure, make, ....
Everything went fine, except for one thing: if I want to look at the
commands history by using the cursor keys, it does not work. Instead of
displaying the previous commands, it returns something like
2016 Apr 26
0
How to print the frequency table (produced by the command "table" to Excel
Hi jpm miao,
You can get CSV files that can be imported into Excel like this:
library(prettyR)
sink("excel_table1.csv")
delim.table(table(df[,c("y","z")]))
sink()
sink("excel_table2.csv")
delim.table(as.data.frame(table(df[,c("y","z")])),label="")
sink()
sink("excel_table3.csv")
2012 Jan 05
3
save output of print() to txt file
I am looking for other option to write the output of the print command in R
I am using sink() to write the R output to a file. This is similar to
what I have:
> a=c(1:30)
> a
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
23 24 25 26 27 28 29 30
> sink("vectorA.txt");print(a);sink()
I am looking for othe roptions to save the output of the print()
2002 Sep 10
3
capturing the result of print in a variable?
I'd like to capture the results of a print() command so that I
can put the results in a tktext widget. I know I can redirect
the output to a file with sink. I'm looking for something like
that, but where I can redirect the output into a variable. Is
there a way to do that?
Mike
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2003 Jun 13
1
problem with latex of object summary reverse
Hi,
I have the following problem (library Hmisc loaded,
iris data loaded, R Version 1.7.0 (2003-04-16), packages
updated, running on a linux Debian i386):
> summary(Species~Sepal.Length,method="reverse")->a
> a
Descriptive Statistics by Species
+------------+-----------------+-----------------+-----------------+
| |setosa |versicolor |virginica
2004 Mar 16
3
save GUI window position in windows version?
Hi,
I'm using windows GUI version. Is there any way
to save window position from previous session?Everytime I
open GUI starts as maximized and I
have to resize it.
Thanks for the help.
SI
2006 Dec 05
1
using R for survival analysis
Thank you to all who made very helpful suggestions to get started with R.
Duncan Murdoch raised an excellent question, asking about my background and
reason for using R. I'm an epidemiologist, applying the marginal structural
models approach (inverse probability of treatment weights) in a Cox
proportional hazards analysis.
The statistical program which I had been using does not have
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
2016 Apr 26
2
How to print the frequency table (produced by the command "table" to Excel
Hi,
How could we print the frequency table (produced by "table") to an Excel
file?
Is there an easy way to do so? Thanks,
Miao
> df <- data.frame(x = 1:3, y = 3:1, z = letters[1:3])
> table(df[,c("y","z")])
z
y a b c
1 0 0 1
2 0 1 0
3 1 0 0
> test<-table(df[,c("y","z")])
> as.data.frame(test)
y z Freq
1 1 a
2009 Feb 17
2
printing out the summary for lm into a txt file
Hi All,
I am trying to run several linear regressions and print out the summay and
the anova reslts on the top of
each other for each model. Below is a sample progarm that did not work. is
it possible to print the
anova below the summary of lm in one file?
thanks for your help
######################################################
data<-read.table("data.txt", header=T,
2015 Jan 02
3
Benchmark code, but avoid printing
Dear all,
I am trying to benchmark code that occasionally prints on the screen
and I want to
suppress the printing. Is there an idiom for this?
If I do
sink(tempfile)
microbenchmark(...)
sink()
then I'll be also measuring the costs of writing to tempfile. I could
also sink to /dev/null, which is probably fast, but that is not
portable.
Is there a better solution? Is writing to a
2002 Dec 20
3
Sweave & xtable
I'm trying to get Sweave running for automatic report generation, and
it seems to run fine when just using verbatim output. However, I've ran
into a problem with xtable. I would like to print the following matrix
using xtable:
> dim(counts)
[1] 19 15
All columns are filled with real/integer numbers > 0 and < 1000. Just
typing xtable(counts) gives correct LaTeX output, but
2013 Mar 02
2
How to start console output with a comment sign (as in knitr)
Dear all,
knitr writes a comment sign in front of each line of console output. This extremely useful, especially for beginners who are starting to write scripts. One could just compose their script in the console (getting immediate output) and then copy the whole chunk into their .r-file.
I have been able to configure the options such that the prompt and the continuing line labels are replaced
2007 Jul 24
3
Redirecting print output
I see a rich set of graphic device functions to redirect that output. Are there commands to redirect text as well. I have a set of functions that execute many linear regression tests serially and I want to capture this in a file for printing.
Thanks,
Stan Hopkins
[[alternative HTML version deleted]]
2010 Apr 08
3
how does one print code
There is quite a long piece of code defining a certain function in one of the
R packages.
I think the code has a bug and I want to get the code into a file so that I
can take a proper look, and possibly fix it.
how does one do this? (I mean getting the code into a file, not fixing the
bug.) I suppose I could copy and paste, but that's a bit error prone for
various reasons. I want the same
2013 Feb 04
2
Wide character in print?
Hello:
I get "Wide character in print" from trying
read.xls("22_data.xls") in the gdata package, with "22_data.xls"
downloaded from "Varieties_Country_A-E.xls" at
"http://www.reinhartandrogoff.com/data/browse-by-topic/topics/7/":
> library(gdata)
> read.xls("22_data.xls")
Wide character in print at
2009 Jun 18
1
Print column headers of summary
Hello,
This is a newbee question. I would simply like to write in a text file the
headers of the summary function along with the computed data.
write(summary(x), file="out.txt")
gives only the data.
I have not found a solution on the forum.
Thank you for any help.
--
View this message in context: http://www.nabble.com/Print-column-headers-of-summary-tp24094930p24094930.html
Sent