Displaying 20 results from an estimated 3000 matches similar to: "cyclic namespace dependency detected when loading ..."
2010 Dec 16
5
test whether all elements of a vector are identical
Dear list,
this might be an easy one, but I could figure out a solution (or how to
google the right term).
Is there any way to test whether all elements of a vector are identical?
For numeric vectors I would use
sum(diff(vector)==0)==0
but I have character vectors. Any Ideas?
Cheers
Jannis
2008 May 13
1
cannot get calls with Tellfree brazilian provider
Hi,
I'm making some tests with Tellfree brazilian provider. I'm using 2
users A and B, one for calling and the other to receive calls. When I
make a call I can see (from the CLI console) user A is calling user B
but user B does not answer (the phone continues to ring) even if the
"sip show registry" command says user B is registered.
In my sip.conf I have:
register =>
2011 Jan 20
2
Procuct of a sequence or vector
Dear list,
is there a function in R that returns the product of a vector?
E.g. if the vector is c(1,2,3,4) it should return 1*2*3*4=24
Cheers
Jannis
2011 Oct 05
3
help with regexp
Dear list memebers,
I am stuck with using regular expressions.
Imagine I have a vector of character strings like:
test <- c('filename_1_def.pdf', 'filename_2_abc.pdf')
How could I use regexpressions to extract only the 'def'/'abc' parts of these strings?
Some try from my side yielded no results:
testresults <-
2013 Apr 08
4
checkUsage from codetools shows errors when function uses functions from loaded packages
Dear list members,
I frequently program small scripts and wrap them into functions to be
able to check them with checkUsage. In case these functions (loaded via
source or copy pasted to the R console) use functions from other
packages, I get this error:
no visible global function definition for ?xxxxxxx?
For example:
test = function() {
require(plotrix)
color.legend()
}
2011 Jan 12
2
RNetCDF: retrieving variable names and units
Dear List,
does anybody has experience with the RNetCDF package? I manage to open a connection and copy data from a ncdf file but would need a way to automatically retrieve variable names (ideally all of them from one file) and units from the file.
Any ideas?
Jannis
2012 Jun 15
2
time zones and the chron to POSIXct conversion
Hey R folks,
i found some strange (to me) behaviour with chron to POSIXct conversion.
The two lines of code result in two different results, on ewith the
correct time zone, one without:
library(chron)
as.POSIXct(chron('12/12/2000'), tz = 'UTC')
as.POSIXlt(chron('12/12/2000'), tz = 'UTC')
Only the code below would give me a POSIXct object with the correct time
2011 Aug 01
3
General indexing in multidimensional arrays
Dear R community,
I have a general question regarding indexing in multidiemensional arrays.
Imagine I have a three dimensional array and I only want to extract on
vector along a single dimension from it:
data <- array(rnorm(64),dim=c(4,4,4))
result <- data[1,1,]
If I want to extract more than one of these vectors, it would now really
help me to supply a logical matrix of the
2011 May 04
1
Problems saving ff objects
Dear list,
I am trying to understand and use the ff package. As I had some problems saving some ff objects, and as I did not fully manage to understand the whole concept of *.ff, *.ffData and *.RData with the help of the documentation, I tried to reproduce the examples from the help of ffsave.
When I ran, however : (copied from the help)
message("let's create some ff objects")
2011 Apr 27
3
setting options only inside functions
Dear list members,
is it possible to set some options only inside a function so that the original options are restored once the function is finished or aborted due to an error? Until now I do something like:
dummy=function()
{
old.options=options(error=dummy1())
....
options(old.options)
}
This works for most cases but when the function terminates because of an error and its last
2012 Nov 18
2
list.files, recursively
Dear R developers,
as far as I understand the manual of list.files(), there is only a way
to exclude directories from the returned vector if you use list.files
recursively. In non recursive mode, there seems to be no way of
excluding directories (the include dirs argument does not seem to have
any effect). Would it not be more intuitive and practical to allow the
switching off of directory
2008 Apr 22
2
optimization setup
Hi, here comes my problem, say I have the following functions (example case)
#------------------------------------------------------------
function1 <- function (x, theta)
{a <- theta[1] ( 1 - exp(-theta[2]) ) * theta[3] )
b <- x * theta[1] / theta[3]^2
return( list( a = a, b = b )) }
#-----------------------------------------------------------
function2<-function (x, theta)
{P
2012 Feb 27
2
problem with assign and get
Dear list members,
does anyone have an idea why the following construction does not work
but gives the following error message:
assign('test', array(1:10, dim=c(10,10)))
dimnames(get('test')) <- list(1:10,1:10)
Error in dimnames(get("test")) <- list(1:10, 1:10) :
target of assignment expands to non-language object
What could be a way to get this to work?
2012 Jul 30
6
Convert variable to STring
Dear all,
I have a variable that I would like also to use it as a string. The reasons is that I want to collect results from different function to one table.. So when I use the
colnames(mymatrix) <-c(function1.function2,function3)
the function1, function2, function3 to be "converted" to simple strings so as
colnames(mymatrix)
2010 May 18
4
scaling with relative units in plots or retrieving axes limits in plots
Dears,
a way to define x and y positions in plots in relative numbers (e.g in fractions between 0 and 1 referring to relative positions inside the plot region) would really help me. One example I would need this to would be to add text via text() to a plot always at a defined spot, e.g the upper left corner. Until now I always determined maximum x and y values and used those, but defining
2007 Dec 10
1
cyclic dependency error
Dear all,
I am encountering a cyclic dependency error when running R CMD check on an R package I wrote (R version 2.6.1, Mac OS X 10.4), see the error message below.
Creating a new generic function for "print" in "clValid"
Creating a new generic function for "summary" in "clValid"
Creating a new generic function for "plot" in
2012 Feb 09
3
calling the function which is stored in a list
Hi
I'm storing two functions in a list
# creating two function
function1 <- function(n) {
return(sum(n))
}
function2 <- function(n) {
return(mean(n))
}
#storing the function
function3 =c(function1,function2)
is it possible to call the stored function and used it ?
x=c(10,29)
funtion3[1](x)
Thanks
-----
Thanks in Advance
Arun
--
View this message in context:
2011 Aug 03
2
syntax with do.call and `[`
Dear List,
i would like to mimic the behaviour or the following indexing with a do.call construct to be able to supply the arguments to `[` as a list:
test = matrix[1:4,2]
result = test[2,]
My try, however, did not work:
result = do.call(`[`,list(test,2,NULL))
result = do.call(`[`,list(test,2,))
result = do.call(`[`,list(test,2,''))
How can I use the do.call in that way with
2013 Jun 20
2
showing error line
Dear R users,
i am trying to get the line number of the code where an error is
produced. With the options:
options(keep.source = TRUE, show.error.locations = TRUE,
keep.source.pkgs = TRUE)
I have managed to get the error locations to show up when i source the
respective files. They do not, however, show up for the same errors when
I use installed packages. Do I have to build these packages
2007 Jun 14
1
Using subset() in a user-defined function
Hello,
I'm having a problem with using subset() inside a function I'm writing.
Ignoring everything else in the function, the problem can be illustrated
by (where master.frame is the data frame I'm using):
function1 <- function(arg1="", arg2="", arg3=""){
temp.frame <- subset(master.frame, a == arg1 & b == arg2 & c ==
arg3)
}
This