Displaying 20 results from an estimated 80000 matches similar to: "'install package(s) from local zip files': what is the syntax for that?"
2017 Aug 03
1
Strange behaviour to download zip file using R
Hi again,
I was trying to download stock market data from below link :
https://www.nseindia.com/products/content/equities/equities/archieve_eq.htm
Input choice :
Select Report: Bhavcopy
Date(DD-MM-YYYY): 03-03-2010
If you put manual input as above, then we will get option for manual
download of file :
cm03MAR2010bhav.csv.zip
However I then tried to use R to have some automatic download :
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
2010 Nov 02
1
Help on install.packages() function
Hi, when I need to download some package I use for example
install.packages("fBasics") function. However simply using that function
needs additional intervention to select the server from which I want to
download. I would like to ask the list how I can put additional argument in
the install.packahes() function to stop showing that pop-up?
While looking into the help page I guess
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 ==
2023 Oct 12
4
if-else that returns vector
Hi,
Following expression returns only the first element
ifelse(T, c(1,2,3), c(5,6))
However I am looking for some one-liner expression like above which
will return the entire vector.
Is there any way to achieve this?
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 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:
>
>
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,
2011 Mar 20
2
Package Installation
Dear all, can somebody guide me how to install the package RQuantLib, for
which windows binary is not available. I have tried installing it with R CMD
INSTALL in my windows vista machine (I have Rtools installed), however it
stopped due to an error saying: "compilation failed for package
'RQuantLib'".
What is should do right to install this package?
Thanks and regards,
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
2006 Jul 16
1
install.packages for local zip files
O/S: Linux
R version : 2.2.1
The R server doesn't have http internet access. And the sys admins will
not install the R libraries that I requested. So I have downloaded the
packages that I want to intall and have moved them into my home
directory on the server. These are a series of *.tar.gz files. I want
to install the R libraries in my home directory, but I can't get it to
work.
2008 Feb 18
2
Windows-GUI: "Install Packages from local zip files" and dependencies
Hi,
When using the "Packages --> Install packages from local zip files" menu
item in the windows-gui:
1) is that supposed to automatically pull in dependencies (in that case I
have to fix something in my package).
2) If that's not the default: is there a way to make it so?
Thanks, Joh
2012 Dec 14
5
A question on list and lapply
Dear all, let say I have following list:
Dat <- vector("list", length = 26)
names(Dat) <- LETTERS
My_Function <- function(x) return(rnorm(5))
Dat1 <- lapply(Dat, My_Function)
However I want to apply my function 'My_Function' for all elements of
'Dat' except the elements having 'names(Dat) == "P"'. Here I have
specified the name
2013 Jan 05
1
Install package from local zip file
Hello,
I just downloaded the MareyMap: an R-based tool and followed the
instructions:
Option1: Click "Packages-Install package(s) from local zip files", it showed
the followed error messages:
> utils:::menuInstallLocal()
Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
cannot open the connection
In addition: Warning
2017 Aug 02
4
Extracting numeric part from a string
Hi again,
I am struggling to extract the number part from below string :
"\"cm_ffm\":\"563.77\""
Basically, I need to extract 563.77 from above. The underlying number
can be a whole number, and there could be comma separator as well.
So far I tried below :
> library(stringr)
> str_extract("\"cm_ffm\":\"563.77\"",
2012 Mar 16
4
How to start R in maximized size???
Dear all, when I start R, I want that the console window should be in
the Maximized size automatically. Can somebody help me how to achieve
that?
Thanks and regards,
2013 Mar 28
4
How to replace '$' sign?
Hello again,
I want to remove "$" sign and replace with nothing in my text.
Therefore I used following code:
> gsub("$|,", "", "$232,685.35436")
[1] "$232685.35436"
However I could not remove '$' sign.
Can somebody help me why is it so?
Thanks and regards
2018 Mar 04
0
Change Function based on ifelse() condtion
That's fine. The issue is how you called Lapply_me(). What did you pass as
the argument to FUN?
And if you did not pass anything that how is FUN declared?
You have not shown that in your email.
On Sun, Mar 4, 2018 at 7:11 PM, Christofer Bogaso <
bogaso.christofer at gmail.com> wrote:
> My modified function looks below :
>
> Lapply_me = function(X = X, FUN = FUN, Apply_MC =
2017 Aug 10
3
Zoo rolling window with increasing window size
Hi Joshua, thanks for your prompt reply. However as I said, sum()
function I used here just for demonstrating the problem, I have other
custom function to implement, not necessarily sum()
I am looking for a generic solution for above problem.
Any better idea? Thanks,
On Fri, Aug 11, 2017 at 12:04 AM, Joshua Ulrich <josh.m.ulrich at gmail.com> wrote:
> Use a `width` of integer index