Displaying 20 results from an estimated 10000 matches similar to: "How to delete Locked files in Mac"
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
2003 Sep 08
6
No nonodump...
I'm not sure where else to ask about this, so please excuse me if this is
the wrong forum. In trying to remove a 'nodump' flag on a directory with the
'chflags' command I have noticed that the 'nonodump' flag does not function.
I see an open PR for the problem:
o [2003/01/09] i386/46912 johan chflags nonodump fails
I was wondering when this might be dealt with? Else is
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
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 Aug 23
4
Getting all possible combinations
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.
1st combination : A
2nd combination : B
.....
5th combination : E
6th combination : A, B
7th combination : B, C
....
last combination: A, B,
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 ==
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
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
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,
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
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 Jul 19
0
Creating/Reading a complex string in R
It was suggested to quote your string with *backticks* (` ... `) rather
than single quotes.
String <- `<html>
<head>
...
`
On 7/18/2017 1:05 PM, Christofer Bogaso wrote:
> Thanks for your pointer.
>
> Is there any way in R how to replace " ' " with " /' " programmatically?
>
> My actual string is quite lengthy, so changing
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
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