similar to: arrayInd and which

Displaying 20 results from an estimated 2000 matches similar to: "arrayInd and which"

2012 Nov 15
3
how to view source code of a function inside a package?
Dear list, I am trying to look at the function inside a package. I know that methods() would do the trick, but what if the function is hidden? I have a problem displaying the hidden function. Say, for example the MCMC package. How do you view the code of that function? something like this: > which function (x, arr.ind = FALSE, useNames = TRUE) { wh <- .Internal(which(x)) if
2017 Aug 24
5
functions from 'base' package are not accessible
Hi all! The following code (executed in console)... somevar <- data.frame(v1 = 1:5, somestring = 6:10, v3 = 11:15, v4 = 16:20); somevar %>% gather(key = var, value = val, which(names(somevar) == "somestring"):length(somevar)) %>% head(2); throws... Error in which(names(somevar) == "somestring") : could not find function "which" if I change
2003 May 19
2
To update() or not to update()?
Hi, Suppose I have: # Fit a base model d1.ph <- coxph(Surv(start, stop, event)~ ejec + diavol + score + smoking + beta + surg.done, data = data.frame(foo)) summary(update(d1.ph, . ~ . + td1)) summary(update(d1.ph, . ~ . + td2)) As I have many columns in my data frame, foo, called td's. e.g. td1, td2, td3, .... And I'd like to
2020 Oct 14
0
which() vs. just logical selection in df
Inline. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Oct 14, 2020 at 3:23 PM 1/k^c <kchamberln at gmail.com> wrote: Is which() invoking c-level code by chance, making it slightly faster > on average? > You do not need
2017 Aug 24
0
functions from 'base' package are not accessible
Try putting !!! (three exclamation symbols) in front of which(...)==.... The non-standard evaluation in the tidyverse can cause confusion. Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Aug 24, 2017 at 4:32 AM, Eugeny Melamud < Eugeny.Melamud at lanit-tercom.com> wrote: > Hi all! > > The following code (executed in console)... > somevar <- data.frame(v1 = 1:5,
2010 Aug 26
3
Passing data to aov
Hello Again Gurus and Lurkers: I?m trying to build a very user-friendly function which does aov without having the user type in a formula (which would be tedious in this case). The idea is to take the response from a PCA score matrix, and the factors from a list. A simple example is the function given below, along with test data and a sample call to the function. I'm certainly having
2011 Nov 01
4
building a subscript programatically
Hi, On ocasion, you need to subscript an array that has an arbitrary (ie. not known in advance) number of dimensions. How do you deal with these situations? It appears that it is not possible use a list as an index, for instance this fails: > x <- array(NA, c(2,2,2)) > x[list(TRUE,TRUE,2)] Error in x[list(TRUE, TRUE, 2)] : invalid subscript type 'list' The only way I know is
2024 Mar 20
1
Building Packages.
I have a source file with oxygen-style comments (and description & licence files), and I?m trying to build a package. oxygen & devtools seem to work, and the tarball exists, but install.packages balks. Does anyone know what?s happening? Regards, Jorgen Harmse. > roxygenise(package.dir,clean=TRUE) Setting `RoxygenNote` to "7.3.1" ? roxygen2 requires "Encoding:
2012 May 14
3
Scraping a web page.
Folks, I want to scrape a series of web-page sources for strings like the following: "/en/Ships/A-8605507.html" "/en/Ships/Aalborg-8122830.html" which appear in an href inside an <a> tag inside a <div> tag inside a table. In fact all I want is the (exactly) 7-digit number before ".html". The good news is that as far as I can tell the the <a>
2004 May 18
1
How can I dial (0 + telephone number)
I connect Asterisk to my analog PBX using X100P. In my analog PBX, I need to dial 0 (zero) to pick up the line. How can I use Dial command to dial (0 + telephone number) directly? I used exten => 10,1,Answer() exten => 10,2,Dial(Zap/1/0) exten => 10,3,Hangup It works, but I need to dial 10 and after the ring tone, the telephone number How can I do?
2012 Sep 11
5
Searching from Dataframe.
Hi, i have a dataframe containing some values. for eg:- MyDataFrame<- Name Age Place ------- ------ ----------- Aby 12 USA Raj 25 UK Romi 32 ENG Amy 31 IND My requirement what is, i have a search key word[it should search from all the columns], that i need to find out from this dataframe. If search keyword found , it
2013 Jan 11
3
locating element in distance matrix
Dear useRs, I have a very basic question. I have a distance matrix and i skipped the upper part of it deliberately. The distance matrix is 1000*1000. Then i used "min" command to extract the lowest value from that matrix. Now i want to know what is the location of that lowest element? More precisely, the row and column number of that lowest element. Thanks in advance elisa
2012 Feb 12
2
Is it possible or has it been done?
A port of R to iOS? Thanks for your time, KW -- [[alternative HTML version deleted]]
2012 Mar 01
3
Create a function "automatically" from lm formula and coefficients?
I hope the subject says it all. I want to be able to use an lm object and the associated coefficients to create function that can produce "expected" "y" values given inputs. Thanks, KW -- [[alternative HTML version deleted]]
2013 Feb 26
2
What happened to "financial" package?
Folks, I have been using the cf function from the "financial" package for a few years now. Upon updating my version of R to ... I found that the package no longer exists in the main collection of R packages. Has this package been renamed or merged with another package? If the functionality is no longer available what is the best way to integrate the archived version of the package
2012 Nov 07
8
Aggregate data frame across columns
Folks, I have a data frame with columns 200401, 200402, ..., 201207, 201208. These represent years/months. What would be the best way to sum these columns by year? What about by quarter? Thanks for your time, KW -- [[alternative HTML version deleted]]
2012 Feb 16
2
Problem building up ggplot graph in a loop.
Folks, I want to automate some graphing using ggplot. Here is my code graphChargeOffs2<-function(coffs) { ggplot(coffs, aes(levels)) dataNames<-names(coffs)[!names(coffs) == "levels"] for(i in dataNames) { thisData<-coffs[[i]] last_plot() + geom_line(aes(y = thisData, colour = i)) } last_plot() + ylab("Total Chargeoffs") } coffs is a data.frame.
2011 Nov 23
9
which en un data.frame de caracteres?
Hola a todos, Tengo un "data.frame" de algunas columnas, el cual contiene objetos de tipo "character". Me interesa encontrar las coordendas de un cierto objeto dentro del "data.frame". Eso para arrays o para matrices lo hago con la función which(). Pero no consigo hacerlo para esta caso ¿alguna sugerencia para realizarlo sin tener que utilizar bucles? Gracias por
2008 Jul 23
0
[LLVMdev] GEP::getIndexValid() with other iterators
Hi Chris, > What flavor of iterators do you want to pass in? vector or > smallvector? If so, a pointer to the first element + extents is fine. I was passing a std::vector in. And you are quite right, first element + size works like a charm. Since I am using a vector of uint64_t's instead of Value*, I did need to add an extra version of getIndexedType(), taking a uint64_t* instead
2008 Dec 26
3
Problem: no such extension 'xx' in context 'default'
Hi Guys, I am not so familiar with asterisk and hope to get help here. I am having now some stupid errors. My goal for the first, is to create a simple pbx with different context. As long as I use only the contex 'default' everything seems to work perfect. Now I tried to add another context i.e 'internal' and the asterisk is complaining for not finding the required extension in