similar to: R function to kill a process

Displaying 20 results from an estimated 40000 matches similar to: "R function to kill a process"

2018 Aug 30
3
Detecting whether a process exists or not by its PID?
Hi, I'd like to test whether a (localhost) PSOCK cluster node is still running or not by its PID, e.g. it may have crashed / core dumped. I'm ok with getting false-positive results due to *another* process with the same PID has since started. I can the PID of each cluster nodes by querying them for their Sys.getpid(), e.g. pids <- parallel::clusterEvalQ(cl, Sys.getpid()) Is there
2018 Aug 31
2
Detecting whether a process exists or not by its PID?
On Fri, Aug 31, 2018 at 2:51 PM Tomas Kalibera <tomas.kalibera at gmail.com> wrote: [...] > kill(sig=0) is specified by POSIX but indeed as you say there is a race > condition due to PID-reuse. In principle, detecting that a worker > process is still alive cannot be done correctly outside base R. I am not sure why you think so. > At user-level I would probably consider some
2018 Mar 18
1
BUG: tools::pskill() returns incorrect values or non-initated garbage values [PATCH]
For the record, I've just filed the following bug report with a patch to https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17395: tools::pskill() returns either random garbage or incorrect values, because the internal ps_kill() (a) it does not initiate the returned logical, and (b) it assigns the logical returned the 0/-1 value of C's kill(). # Example 1: returns garbage due to
2010 Jul 26
7
Bug on r-bc?
Dear All, The following code should return 1, but it returns 0: source("http://r-bc.googlecode.com/svn/trunk/R/bc.R") bc("9 % 2") Do you confirm this bug? Paul
2006 Mar 25
7
Regexp subexpression
I can't get the PERL subexpression translated to R. Following, for example, B. Ripley's http://finzi.psych.upenn.edu/R/Rhelp02a/archive/58984.html I am using sub, but it looks like an ugly substitute. Assume I want to extract the first alpha part and the first numeric part, but only if they are in sequence. Do I really have to use the sub twice, first extracting the first variable, then
2004 Dec 24
6
Sorting problem
Hi I'm using R 2.0 in SuSE 9.2. When I plot data as a boxplot, the boxes appear on the plot in alphabetical order (of group) rather than the order in which they appear in the data. So far, the only thing I can do to fix this is to prefix the group labels with a,b,c...etc to trick R into plotting them in the right order. Can sorting be turned off? How should I address this sensibly? Thanks
2004 Mar 18
12
substitute question
Consider the following example: # substitute a with b in the indicated function. Seems to work. > z <- substitute( function()a+1, list(a=quote(b)) ) > z function() b + 1 # z is an object of class call so use eval # to turn it into an object of class expression; however, # when z is evaluated, the variable a returns. > eval(z) function()a+1 Why did a suddenly reappear again
2008 Nov 29
2
Using grep() to subset lines of text
I have two vectors, a and b. b is a text file. I want to find in b those elements of a which occur at the beginning of the line in b. I have the following code, but it only returns a value for the first value in a, but I want both. Any ideas please. a = c(2,3) b = NULL b[1] = "aaa 2 aaa" b[2] = "2 aaa" b[3] = "3 aaa" b[4] = "aaa 3 aaa"
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
2006 May 19
11
iraq statistics - OT
I came across this one: http://www.nysun.com/article/32787 which says that the violent death rate in Iraq (which presumably includes violent deaths from the war) is lower than the violent death rate in major American cities. Does anyone have any insights from statistics on how to interpret this?
2005 May 17
4
Combinations with two part column
Dear R-helpers, I am a beginner using R. This is the first question in this list. My question, Is there possible to make combinations with two part column? If I have a number 1,2,3,4,5,6,7,8. I need the result something like below: 1,2,3,4,5 6,7,8 1,2,3,4,7 5,6,8 2,3,4,5,6 1,7,8 1,2,3,6,7 4,5,8 1,2,3,4,8 5,6,7 3,4,6,7,8 1,2,5 .... I would be very happy if anyone could
2018 Aug 31
0
Detecting whether a process exists or not by its PID?
On 08/31/2018 03:13 PM, G?bor Cs?rdi wrote: > On Fri, Aug 31, 2018 at 2:51 PM Tomas Kalibera <tomas.kalibera at gmail.com> wrote: > [...] >> kill(sig=0) is specified by POSIX but indeed as you say there is a race >> condition due to PID-reuse. In principle, detecting that a worker >> process is still alive cannot be done correctly outside base R. > I am not sure
2023 Nov 14
1
data.frame weirdness
Also why should that difference result in different behavior? On Tue, Nov 14, 2023 at 9:38?AM Gabor Grothendieck <ggrothendieck at gmail.com> wrote: > > In that case identical should be FALSE but it is TRUE > > identical(a1, a2) > ## [1] TRUE > > > On Tue, Nov 14, 2023 at 8:58?AM Deepayan Sarkar > <deepayan.sarkar at gmail.com> wrote: > > > >
2018 Jan 25
6
Portable R in zip file for Windows
What is wrong with you guys? I asked for a zip, like R Studio has for example. Totally clear. I cant execute exes. But I can unzip files. Thanks Gabor, I had that in mind, but can't execute the exe due to security restrictions. Geez, really, treating people who ask questions this way just makes you don't want to ask a single one. On Thu, Jan 25, 2018, 11:19 Gabor Grothendieck
2018 Jan 26
2
Portable R in zip file for Windows
Pretty good question Gabor. I can execute R once it is installed (if someone with rights installs it before) but not the installer. I can download the installer (with some pain). I know that some installers are actually compressed files in disguise, but I think this is not the case with R, right? I will study the exact nature of the restriction, and get back to you. Nevertheless, having a
2023 Nov 14
1
data.frame weirdness
On Tue, 14 Nov 2023 at 09:41, Gabor Grothendieck <ggrothendieck at gmail.com> wrote: > > Also why should that difference result in different behavior? That's justifiable, I think; consider: > d1 = data.frame(a = 1:4) > d2 = d3 = data.frame(b = 1:2) > row.names(d3) = c("a", "b") > data.frame(d1, d2) a b 1 1 1 2 2 2 3 3 1 4 4 2 > data.frame(d1,
2005 Jun 30
5
答复: fail in adding library in new version.
Dear Gabor, Thank your for helping me so much! I have loaded R the newest version 2.1.1. Then I setup it in the path of D:\program files\R\ 1. unpack tools.zip into c:\cygwin 2. install Active perl in c:\Perl 3. install the mingw32 in c:\mingwin 4. add "c:\cygwin; c:\mingwin\bin" in "Control Panel -> System -> Advanced -> Environment Variables -> Path ->
2006 Jan 10
5
matching country name tables from different sources
Hi, Before I reinvent the wheel I wanted to kindly ask you for your opinion if there is a simple way to do it. I want to merge a larger number of tables from different data sources in R and the matching criterium are country names. The tables are of different size and sometimes the country names do differ slightly. Has anyone done this or any recommendation on what commands I
2009 Jun 19
3
please recommend hands-on books on classification, data-mining and machine learning with R?
Hi all, Could anybody please recommend some hands-on books on classification, data-mining and machine learning with R? I would like to get a very good understanding of the statistical tools that are used in these areas, while reducing the learning curve. Thank you!
2005 Jul 08
3
fail in adding library in new version.
Dear all, I really appreciate your help. I think I have a little advancement. ^_^ When I enter the Dos environment, at first, into the D:\>, I type the following code: cd Program Files\R\rw2011\ bin\R CMD install /example "example" is in the d:\, which include the R folder and "DESCRIPTION" file, But I wrote nothing in the "DESCRIPTION" file. Actually, I