Displaying 20 results from an estimated 2000 matches similar to: "cat() in proc.time?"
2016 Jul 17
1
cat() in system.time() ?
On Fri, 15 Jul 2016, Martin Maechler wrote:
> Hi Ben (and everyone else),
>
> as this did not attract attention yet, let me start
>
>>>>>> Ben Bolker <bbolker at gmail.com>
>>>>>> on Mon, 4 Jul 2016 11:49:40 -0400 writes:
>
> > Does anyone know if there's a reason that proc.time() uses cat()
> > rather than
2016 Jul 15
0
cat() in system.time() ?
Hi Ben (and everyone else),
as this did not attract attention yet, let me start
>>>>> Ben Bolker <bbolker at gmail.com>
>>>>> on Mon, 4 Jul 2016 11:49:40 -0400 writes:
> Does anyone know if there's a reason that proc.time() uses cat()
> rather than message() to print the output when there has been an error
> in the process of
2008 Jan 11
1
How to disable output messages (prints or cats) from functions in R?
Hi everybody,
I have to use a function that shows an output message like "# nonzero
coefficients ..." followed with a lot of numbers depending on the input.
This is very annoying because I have to run that function several times
and I don't want to show this information.
What I want is to disable that display but I don't know how to do it.
I've tried it with
2015 Sep 10
2
Using IDs to suppress specific messages and warnings
The suppressMessages and suppressWarnings functions currently suppress
all the message or warnings that are generated by the input
expression.
The ability to suppress only specific messages or warnings is
sometimes useful, particularly for cases like file import where there
are lots of things that can go wrong.
Suppressing only messages that match a regular expression has rightly
been rejected
2009 Jun 02
1
help on understanding a code
Dear R user,
I am trying to understand this following code. Basically it's using a
permutation method to calculate p value. But I would like to know exactly
how the permutation works.
#calculates null statistics
tt0 <- 0
set.seed(123)
B <- 100
for(i in 1:B) {
v <- sample(y)
tt0 <- c(tt0,ttest(dat,v)$tt)
}
tt0 <- tt0[-1]
#form p-values
att <- abs(tt)
att0 <- abs(tt0)
v
2017 Sep 14
1
Print All Warnings that Occurr in All Parallel Nodes
Dear R Users,
I have developed the following code for importing a series of zipped CSV by parallel computing.
My problems are that:
A) Some ZIP Files (Which contain CSVs inside) are corrupted, and cannot be opened.
B) After executing parRapply I can only see the last.warning variable error, for knowing which CSV have failed in each node, but I cannot see all warnings, only 1 at a time.
So:
*
2012 Mar 15
2
ggplot2: goem_smooth and suppress messages
Hi
When I run my script using ggplot and geom_smooth I get messages that I
would like to suppress:
p <- ggplot(dataSubset)
p <- p + aes(x = as.Date(factor(key),format="%Y%m%d")) + geom_line()
p <- p + geom_smooth(span=0.2,se=FALSE,size=0.7)
The messages look like this:
geom_smooth: method="auto" and size of largest group is <1000, so using
loess. Use 'method
2006 Dec 15
6
Query regarding linking R with Matlab
Thank you sir for your prompt reply.
Currently i am stuck at point where I need to call an available Matlab program from an R 2.4.0 interface. How can I do this? I have downloaded the R.matlab file and also the manual in pdf. But still i am not able to get through the problem. I will be grateful to you if you can elaborate me on this.
Awaiting your reply,
regards,
Bhanu Kalyan K
2017 Sep 25
2
build a SpatialLines object from a list
Hi all,I'm trying to build a SpatialLines object from a list that contains 124 river segments. Each segment in the list contains the x,y coordinates. I'm using the following code to create the SpatialLines object, but it just retrieves one segment. Any suggestions?
test.func = function(x){
??? for (i in 1:length(x)) {??????? tt[[i]] <- x[i]; tt[[i]]? = Line(tt[[i]]); tt[[i]]? =
2017 Sep 25
0
build a SpatialLines object from a list
Hi Ashraf,
It is not obvious to me what your structures are but one problem in your
function is the assignment tt1 <- SpatialLines(list(tt[[i]])).
This will set tt1 to just have one item.
Consider the following
test.func <- function(x) {
tt1 <- list()
for ( i in ... ) {
...
tt1[[i]] <- SpatialLines(tt[[i]])
}
return(tt1)
}
HTH,
Eric
On Mon, Sep 25,
2017 Sep 26
2
build a SpatialLines object from a list
Hi Eric,
Thanks for the help.But this will not solve the problem as it will generate a list and what I need is an object of class sp using SpatialLine function from sp package.So, I need to convert each matrix to coordinates and then to a line and then to a spatial line as figured in the code.
My data structure is a list of 141 matrices.Each matrix represents coordinates of the river lines
2012 May 03
6
Cannot read or write to file in Linux Ubuntu
I am the proud owner of a new laptop since my old one died the other day.
Currently I have a dual-boot Windows 7 Home and Ubuntu 12.04 . I'll leave the Windows problems for another post.
I know practically nothing about Linux so I am probably doing something stupid but ... at the moment I cannot seem read or write files in Ubuntu. I am not having any problem saving other documents to the
2011 Oct 05
3
suppressing stderr output from system() calls
Dear list,
I'm trying to suppress/redirect/squash the output from commands like install.packages, or download.file. The problem is that none of: sink(..., type="message"), sink(..., type="output"), capture.output, suppressMessages are quite doing the trick. Output gets written to the stderr stream, despite any combination of the above suppression commands.
According to
2002 Apr 02
1
cbind.ts bug?
The following creates a time series tt1 whose values rise from 1
to 20 and another time series tt2 each of whose values are 10 larger
than the corresponding value in tt1. When we attempt to bind them
together as columns, the entry after Dec 1960 is erroneously listed
as NA 1960 instead of Jan 1961. If n is changed to either 19 or is
changed to 21 in the example below, the example suddenly
2004 Nov 21
3
Help with ooplot(gplots) and error bars
Dear All
I am trying to graph a proportion and CI95% by a factor with ooplot (any
other better solution ?)
It works well until I try to add the confidence interval.
this is the error message and and a description of the data:
> dat1
PointEst
TT1 1 3.6
TT2 2 5.0
TT3 3 5.8
TT4 4 11.5
TT5 5 7.5
TT5 6 8.7
TT7 7 17.4
> dat2
2023 Feb 19
2
R: determine if `suppressMessages()` has been invoked
Awesome, this gets the job done.
To answer your question:
When using C or C++ via Rinside or within a package, those functions do not listen to suppressMessages, e.g. `Rprintf` keeps printing to the console. Since it's common to use wrapper functions in R anyway, they can run `are_messages_suppressed` and pass the information on to an explicit `verbose` argument of the C / C++ function.
2023 Feb 19
1
R: determine if `suppressMessages()` has been invoked
Hi all,
I would like to create a function that detects if suppressMessages has been invoked upon running that same function. I was looking through {https://cran.r-project.org/doc/manuals/r-release/R-ints.html}, but I haven't found an answer. I do not understand **how** suppressMessages works.
I have not received an answer on SO
2012 May 18
1
Help for numericDeriv function
Hi,
I am stuck on something for a couple days, I am almost about to give up.
This looks simple, but I can't figure out. I hope I can get some help here.
I am trying to do some symbolic and numerical derivations. Let me explain
the problem. Let's say, I have a matrix as follows:
> load <- matrix(c(3,0,1,4,1,3),nrow=3,ncol=2,byrow=TRUE)
>
> load
[,1] [,2]
[1,] 3 0
2006 Aug 16
1
Specifying Path Model in SEM for CFA
I'm using specify.model for the sem package. I can't figure out how to
represent the residual errors for the observed variables for a CFA
model. (Once I get this working I need to add some further constraints.)
Here is what I've tried:
model.sa <- specify.model()
F1 -> X1,l11, NA
F1 -> X2,l21, NA
F1 -> X3,l31, NA
F1 -> X4,l41, NA
F1 -> X5, NA, 0.20
2004 Dec 09
2
"sequence of factor settings"?
Hi,
exist in any package a function which "work with sequences".
Easy example 10 factors with 2 levels, are if i'm
correct theoretical 2^10 "sequences" possible.
But i have more than 2 levels and perhaps more than 10 factors and
interested for the top10 "sequence's"
with higehest freqs and wish to know which type of sequence it is.
Many thanks for a