This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
So I have this assignment:
I need help with question 2.
I thought I knew how to do it, when I realized the factorials are being computed backwards. The algorithm is correct intuitively, but I can't seem to find a loop invariant that holds true before the loop starts.
I'm confused. Thanks.
Hint. It does not change the result of the algorithm if you add z <- y before the loop begins. Does that make your loop invariant easier to find?
This is probably what you're looking for. It doesn't contain only the answer itself but also provides a useful explanation so i reckon it's good learning material.
Related
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I have got a little problem. I have data which I want to map but the thing is that I dont have real location names just the short forms like: SANSAN210 OR miamia305 which I think is the the state and the county and the area code phone number. Does anyone how to convert this so I can map it on the us map?
All you need is the area code (or possibly the county-areacode intersection). There are area code maps as shapefiles. Use readShapePoly or readOGR and merge the two.
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 11 years ago.
I need to generate the numbers from 2 to 100 excluding the numbers (11,21,31,41 etc).
I know to do 2 to 100 is simply 2:100 but I am uncertain how I would go about excluding certain values.
Thanks for any help.
probably not too elegant but works.
c(1:100)[-seq(from=1, to=91, by=10)]
however, your question could have been improved ;)
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
What is the chance that the first five cards chosen from a deck of 52(bridge/poker) cards will contain Two(only two) cards of the same denomination(two 3's for example)?
How can we solve the following problem by resampling method in R
On Wikipedia, they have the formula for finding the probability for two alike cards, three of a kind, etc.. I'd use that formula.
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 9 years ago.
I've noticed that multi=TRUE is not functional when used in gfile.
For example look at the following structure:
getfiles <- gfile(type = c("open"), filter=list("txt"=list(patterns=("*.txt"))), multi=TRUE)
Thanks, there is a typo. Try using "multiple" instead of "multi" for now or grab the latest from r-forge.
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 12 years ago.
Do you think that it is a good time to start using drupal 7 already? (I am mainly worried about modules. it seems that some important modules are not yet ported to drupal 7) Or stick with 6? Just need your personal opinion.
Even though I tried d7 already in autumn and have been looking forward to the release date I since haven't used it yet, mostly because I was enthusiastic about some (private) projects and wanted to see results quickly and in d6 I know what I do and how long it takes.
But in the next days i hopefully have some spare time and mood to start finally with d7. My guess would also be the modules will rise very quickly. (Has anybody an overview about that progress?)
Just go for it, IMO.