Displaying 20 results from an estimated 40000 matches similar to: "Getting all possible combinations"
2017 Aug 23
3
Getting all possible combinations
ummm, Ista, it's 2^n.
Cheers,
Bert
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, Aug 23, 2017 at 8:52 AM, Ista Zahn <istazahn at gmail.com> wrote:
> On Wed, Aug 23, 2017 at 11:33 AM, Christofer Bogaso
>
2017 Aug 23
0
Getting all possible combinations
On Wed, Aug 23, 2017 at 11:33 AM, Christofer Bogaso
<bogaso.christofer at gmail.com> wrote:
> Hi again,
>
> I am exploring if R can help me to get all possible combinations of
> members in a group.
>
> Let say I have a group with 5 members : A, B, C, D, E
>
> Now I want to generate all possible unique combinations with all
> possible lengths from that group e.g.
2017 Aug 23
0
Getting all possible combinations
On Wed, Aug 23, 2017 at 12:35 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
> ummm, Ista, it's 2^n.
ummm yes ughhhh.
My point is, if the number of groups is large, check it before hand.
If you can check it without embarrassing yourself in public like I did
that's even better.
Best,
Ista
>
> Cheers,
> Bert
>
>
> Bert Gunter
>
> "The trouble
2017 Aug 23
2
Getting all possible combinations
> On 23 Aug 2017, at 20:51 , Ista Zahn <istazahn at gmail.com> wrote:
>
> On Wed, Aug 23, 2017 at 12:35 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
>> ummm, Ista, it's 2^n.
>
> ummm yes ughhhh.
>
You didn't really say otherwise: sum(choose(n,0:n)) == 2^n by the binomial expansion of (1+1)^n (but you knew that)
This points to a different
2017 Aug 23
0
Getting all possible combinations
Inline.
-- Bert
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, Aug 23, 2017 at 1:58 PM, peter dalgaard <pdalgd at gmail.com> wrote:
>
>> On 23 Aug 2017, at 20:51 , Ista Zahn <istazahn at gmail.com> wrote:
>>
2018 Jun 01
1
Unable to take correct Web-snapshot
Thanks for that information.
However how can I use R to directly get data from that API?
On Fri, Jun 1, 2018 at 8:36 PM Martin M?ller Skarbiniks Pedersen <
traxplayer at gmail.com> wrote:
> On 1 June 2018 at 15:08, Christofer Bogaso <bogaso.christofer at gmail.com>
> wrote:
> > Hi again,
> >
> > I use the *webshot* package to take snapshot from Webpage.
2018 Jan 06
3
How to programmatically save a web-page using R (mimicking Command+S)
Hi,
I would appreciate if someone can give me a pointer on how to save a
webpage programmatically using R.
For example, let say I have this webpage open in my browser:
http://www.bseindia.com/stock-share-price/dabur-india-ltd/dabur/500096/
When manually I save this page, I just press Command+S (using Mac) and
then this page get saved in hard-disk
Now I want R to mimic this same job that I do
2017 Jul 18
4
Creating/Reading a complex string in R
Thanks for your pointer.
Is there any way in R how to replace " ' " with " /' " programmatically?
My actual string is quite lengthy, so changing it manually may not be
possible. I am aware of gsub() function, however not sure I can apply
it directly on my original string.
Regards,
On Tue, Jul 18, 2017 at 10:27 PM, John McKown
<john.archie.mckown at gmail.com>
2013 Mar 09
4
Calculation with date
Hello again,
Let say I have an non-negative integer vector (which may be random):
Vec <- c(0, 13, 10, 4)
And I have a date:
> Date <- as.Date(Sys.time())
> Date
[1] "2013-03-09"
Using these 2 information, I want to get following date-vector:
New_Vec <- c("2013-03-01", "2014-04-01", "2014-01-01", "2013-07-01")
Basically the
2016 Apr 16
2
How to delete Locked files in Mac
Hi,
I am looking for some R code, which will delete all files in a Folder
that contains both Locked and Unlocked files. There are many,
therefore i would like to delete all files programmatically in one go.
I used following code :
## "SS" is the Folder name including entire path which contains Locked
and Unlocked files.
file.remove(file.path(ss, list.files(ss)))
[1] FALSE
Warning
2012 Jul 30
4
A "matching problem"
Dear all, I was encountering with a typical Matching problem and was
wondering whether R can help me to solve it directly.
Let say, I have 2 vectors of equal length:
vector1 <- LETTERS[1:6]
vector2 <- letters[1:6]
Now I need to match these 2 vectors with all possible ways like:
(A,B,C,D,E) & (a,b,c,d,e) is 1 match. Another match can be (A,B,C,D,E) &
(b,a,c,d,e), however there
2018 Mar 04
3
Change Function based on ifelse() condtion
Below is my full implementation (tried to make it simple as for demonstration)
Lapply_me = function(X = X, FUN = FUN, Apply_MC = FALSE, ...) {
if (Apply_MC) {
return(mclapply(X, FUN, ...))
} else {
if (any(names(list(...)) == 'mc.cores')) {
myList = list(...)[!names(list(...)) %in% 'mc.cores']
}
return(lapply(X, FUN, myList))
}
}
Lapply_me(as.list(1:4), function(xx) {
if (xx ==
2018 Jan 06
0
How to programmatically save a web-page using R (mimicking Command+S)
The 'webshot' package (on CRAN) can do this.
Henrik
On Jan 6, 2018 05:27, "Christofer Bogaso" <bogaso.christofer at gmail.com>
wrote:
> Hi,
>
> I would appreciate if someone can give me a pointer on how to save a
> webpage programmatically using R.
>
> For example, let say I have this webpage open in my browser:
>
>
2017 Jul 18
3
Creating/Reading a complex string in R
Hi again,
Let say I have below string (arbitrary)
<html>
<head>
<script type="text/javascript" <script type="text/javascript">
mystatement('current', {'pac':['']});
mystatement;
I want to pass above string to some R variable for further analysis.
So I have tried below :
String = '<html>
2010 Jul 10
7
Need help on date calculation
Hi all, please see my code:
> library(zoo)
> a <- as.yearmon("March-2010", "%B-%Y")
> b <- as.yearmon("May-2010", "%B-%Y")
>
> nn <- (b-a)*12 # number of months in between them
> nn
[1] 2
> as.integer(nn)
[1] 1
What is the correct way to find the number of months between "a" and "b",
still
2018 Mar 04
0
Change Function based on ifelse() condtion
The reason that it works for Apply_MC=TRUE is that in that case you call
mclapply(X,FUN,...) and
the mclapply() function strips off the mc.cores argument from the "..."
list before calling FUN, so FUN is being called with zero arguments,
exactly as it is declared.
A quick workaround is to change the line
Lapply_me(as.list(1:4), function(xx) {
to
Lapply_me(as.list(1:4),
2018 Mar 04
2
Change Function based on ifelse() condtion
My modified function looks below :
Lapply_me = function(X = X, FUN = FUN, Apply_MC = FALSE, ...) {
if (Apply_MC) {
return(mclapply(X, FUN, ...))
} else {
if (any(names(list(...)) == 'mc.cores')) {
myList = list(...)[!names(list(...)) %in% 'mc.cores']
}
return(lapply(X, FUN, myList))
}
}
Here, I am not passing ... anymore rather passing myList
On Sun, Mar 4, 2018 at 10:37 PM,
2013 Jan 15
2
Need some help on Text manipulation.
Dear all,
Let say I have following data-frame:
Dat <- structure(list(dat = c(-0.387795842956327, -0.23270882099043,
-0.89528973290562, 0.95857175595512, 1.61680582493783, -1.17738110289352,
0.210601060411423, -0.827369747447338, -0.36896112964414, 0.440288648776096,
1.28018410608809, -0.897113649961341, 0.342216546981718, -1.17288066266219,
-1.57994101992621, -0.913655547602414,
2018 Mar 04
2
Change Function based on ifelse() condtion
@Eric - with this approach I am getting below error :
Error in FUN(X[[i]], ...) : unused argument (list())
On Sun, Mar 4, 2018 at 10:18 PM, Eric Berger <ericjberger at gmail.com> wrote:
> Hi Christofer,
> You cannot assign to list(...). You can do the following
>
> myList <- list(...)[!names(list(...)) %in% 'mc.cores']
>
> HTH,
> Eric
>
> On Sun, Mar
2016 Apr 16
0
How to delete Locked files in Mac
The command:
system("chflags -R nouchg /path/to/your/directory")
... should unlock your files recursively in the directory. Then proceed with
file.remove()
B.
On Apr 16, 2016, at 3:09 PM, Christofer Bogaso <bogaso.christofer at gmail.com> wrote:
> Hi,
>
> I am looking for some R code, which will delete all files in a Folder
> that contains both Locked and