Displaying 20 results from an estimated 700 matches similar to: "Printing to PDF in for"
2009 Dec 15
1
S4 dispatch and S3 "connection" objects
Hello,
I'm trying to get S4 dispatch on S3 "connection" objects.
So I do :
setOldClass( "connection" )
and then :
setGeneric( "bling", function(object) standardGeneric( "bling" ) )
setMethod( "bling", "connection", function(object) cat( "gotcha ",
as.integer(object), "\n" ) )
but I get :
f <- file(
2009 Dec 15
2
split.data.frame
Hello,
I very much enjoy "with" and "subset" semantics for data frames and was
wondering if we could have something similar with split, basically by
evaluating the second argument "with" the data frame :
split.data.frame
function(x, f, drop = FALSE, ...){
call <- match.call( )
fcall <- call( "with", data = call[["x"]],
2009 Dec 15
3
Redirect standard output (PR#14148)
Full_Name: Joe Song
Version: 2.10.0
OS: Windows 7
Submission from: (NULL) (97.123.159.234)
Symptom: The following command in R
> system("program > run.log")
would not redirect standard output to the file "run.log".
This bug did not exist on Windows XP, but appeared on Windows 7 when the same
program is run.
2009 Dec 14
2
Combinations
Dear R helpers,
I am working on the scenario analysis pertaining to various interest rates. In this connection I need to form the various combinations as under :
Suppose I have two sets A = (a, b, c) and B = (x,y,z)
Then I can easily form the cominations as
(ax, ay, az, bx, by, bz, cx, cy, cz)
However, if I have say 5 variables, then total no of possible combinations will be 3^5 = 243.
2009 Dec 13
1
How to resolve include Rcpp.h problems?
Hi,
I am Linux Ubuntu 9.04 user. I'm using R-2.6.
Actually, I am developing R package for reading/writing 3D images. I needed
to use the R package Rcpp in order to make profit of available C/C++ codes.
My problem is that my C code is not able to include the Rcpp.h
In fact, when I run this command R CMD build rply, I got the following error
message in the file
2009 Dec 17
2
issue with using rm: cannot generate on-the-fly list
Hello,
I have the following problem when trying to use rm:
In a top level script file I have a loop iterating over some index. The loop
is not contained within a function, so the scope of variables declared in
the loop is global. Within this loop I generate several variables which
should be removed at the end of each iteration. To do this, I wrote a
function to clean up the workspace. An example
2010 Feb 03
3
diagnostic plots
Dear all,
does anybody ever encountered the problem with diagnostic plots?
x<-rnorm(100)
y<-rnorm(100)
plot(lm(x~y))
It gives the following message "Waiting to confirm page change..." and
nothing happens.
Thanks a lot!
[[alternative HTML version deleted]]
2009 Dec 08
2
automated image processing
Hi,
I am looking for a R package which is capable to process and analysis pictures of tissues (stained) in an automatic way.
I had a look on biops and EBImage (Bioconductor) but they are not automatic...
Did you already use/know a such package ?
Thanks,
- Martial
_________________________________________________________________
Tchattez en direct en en vidéo avec vos amis !
2009 Dec 02
2
Arithmetic on multiple files
Dear R-users,
I'd like to perform arithmetic functions on 1000 files containing a
2000x2000 matrix. Can anyone advise?
For example,
File1 File2 Output
1 1 1 4 4 4 5 5 5
2 2 2 + 5 5 5 = 7 7 7
3 3 3 6 6 6 9 9 9
Muhammad
--
Muhammad Rahiz | Doctoral Student in Regional Climate Modeling
Climate Research
2009 Dec 05
1
R brush for SyntaxHighlighter
Hello,
I've written a brush for R for the SyntaxHighlighter JavaScript
library. It allows you to display R code on a web page with the proper
syntax highlighting. It's available here:
http://demitri.com/code
Comments and suggestions for improvement are welcome!
Cheers,
Demitri
2010 Jan 13
4
<= returns wrong result? Why
Dear all,
Does anybody know the probable reason why <= gives false when it should give
true?
These two variables are of the same type, and everything works in the cycle
but then it stops when they are equal.
this is the output result
> Rk[47] <= RB[21]
[1] FALSE
> Rk[47]
[1] 0.002842007
> RB[21]
[1] 0.002842007
Thanks a lot.
[[alternative HTML version deleted]]
2010 Jul 09
3
strange floor rounding
Dear all,
might seem and easy question but I cannot figure it out.
floor(100*(.58))
[1] 57
where is the trick here? And how can I end up with the right answer?
Thanks a lot everybody for your help.
Trafim
[[alternative HTML version deleted]]
2009 Dec 04
2
selective subsetting of a correlation matrix
Dear All,
I have a correlation matrix say 'M' (4000x4000) for 4000 genes and I want to
subset it to 'N' (190x190) for 190 genes.
The list of those 190 genes are in variable 't'. So the idea is to read the
names of genes from variable 't' and subset the matrix M accordingly.
Any thoughts are welcome!
Best
Lee
[[alternative HTML version deleted]]
2010 Jul 14
4
reverse string
Dear all,
Are there any functions in R to reverse the order of the string.
smth like reverse("abc") to get "cba"?
Thanks a lot.
[[alternative HTML version deleted]]
2010 Jan 14
3
plot type any symbols?
Dear all,
I have a question is there a possibility to plot points with different
symbols like stars, crosses?
I looked at different types for plot command and didn't find anything like
that.
Thanks a lot.
[[alternative HTML version deleted]]
2010 Jan 07
2
Graph titles from massive
Dear all,
I would like to ask you if there is a possibility in R to give the names to
graphs which are not const.
For example,
How to name each plot, or to add notes like a=x[i], b=y[i] in this cycle
x<-c(1,2,3,4,5,6)
y<-c(7,8,9,10,11,12)
par(mfrow=c(2,3))
for (i in 1:6){
plot(x,y)
}
Thank you for your time and help!
[[alternative HTML version deleted]]
2010 Feb 05
3
Extract p-value from lm for the whole model
Dear all,
I would like to ask how to extract the p-value for the whole model from
summary(lm).
This didn't help a lot summary.lm
summary(lm(speed~dist, cars))
Thanks a lot!
[[alternative HTML version deleted]]
2010 Jan 22
4
Extract R-squared from summary of lm
Dear all,
I cannot find to explicitly get the R-squared or adjusted R-squared from
summary(lm())
Thanks a lot!
[[alternative HTML version deleted]]
2010 Sep 09
1
createDataPartition
Dear all,
does anyone know how to define the structure of the required samples using
function createDataPartition, meaning proportions of different types of
variable in the partition?
Smth like this for iris data:
createDataPartition(y = c(setosa = .5, virginica = .3, versicolor = .2),
times = 10, p = .7, list = FALSE)
Thanks a lot for your help.
Regards,
Trafim
[[alternative HTML version
2010 Apr 05
3
Matrix elements are vectors
Dear all,
My question how is it possible to define a matrix A with 10 rows 1 column,
so that its elements are vectors of undefined length.
I need to have a possibility later to add elements like A[1,1] <-
c(A[1,1],3,4,5)
Thanks a lot for the help!
[[alternative HTML version deleted]]