Displaying 20 results from an estimated 60000 matches similar to: "What is going on?"
2010 Mar 29
3
one way to write scripts in R
Dear R users,
A colleague of mine asked me how to write a script (an executable text file
containing R code) in R. After I showed
him, he said that after extensive searching of the R archives, he had not
found anything like these techniques.
He suggested that I share these methods to enable others to leverage R as a
better alternative to bash/perl scripts.
So in the interest of giving back to
2017 Nov 08
2
[RFC] lld: Dropping TLS relaxations in favor of TLSDESC
On Wed, Nov 8, 2017 at 9:33 AM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:
> Rui Ueyama <ruiu at google.com> writes:
>
> >> If you are creating an executable and if your executable is not
> >> > position-independent, you're using Initial Exec model by default
> which is
> >> > as fast as variables accessed through
2017 Nov 08
2
[RFC] lld: Dropping TLS relaxations in favor of TLSDESC
On Tue, Nov 7, 2017 at 8:16 PM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:
> Rui Ueyama <ruiu at google.com> writes:
>
> >> So I am strongly against removing either non TLSDESC support of support
> >> for the relaxations.
> >>
> >
> > It's still pretty arguable. By default, compilers use General Dynamic
> model
2009 Nov 10
3
creating multiple plots using a splitting factor
Hello,
I am new to R. I often collect data at multiple sites and need to
create separate graphs (such as scatterplots or histograms) of specific
variables for each site. I have tried to do this by splitting the data
frame and then using lapply, but it seems that the graphing commands
cannot be called as functions. Here is a sample of my data, called
"seeddist2":
site
2006 Feb 11
5
[OT] How to prepend copyright notices to each source file
Sorry for the off-topic post, but I guess someone else may hit the same
issue....
Having developed a rails application, I now need to put GPL text and a
copyright notice at the start of each source file. For the .rb files, this
will look like:
# Copyright 2006 Robert Jones...........
and for the .rhtml files it will look like:
<!-- Copyright 2006 Robert Jones.........
Can anyone think of
2013 Feb 18
3
Cortar una cadena por un caracter solo cuando no forma parte de una subcadena entrecomillada
Hola, ¿qué tal?
Tengo el siguiente problema. Me llegan (simplificando) cadenas del tipo
1,2,"algo"; 3,"cosa"; 4,2,3,7;
y tengo que partirlas por el caracter ";" para meterlas en una lista.
Lo hago con strsplit y no tengo problemas...
... hasta que recibo cadenas como
1,2,"algo;todo"; 3,"cosa"; 4,2,3,7;
en las que existen puntos y coma
2018 Sep 19
5
segfault issue with parallel::mclapply and download.file() on Mac OS X
I have an lapply function call that I want to parallelize. Below is a very
simplified version of the code:
url_base <- "https://cloud.r-project.org/src/contrib/"
files <- c("A3_1.0.0.tar.gz", "ABC.RAP_0.9.0.tar.gz")
res <- parallel::mclapply(files, function(s) download.file(paste0(url_base,
s), s))
Instead of download a couple of files in parallel, I get a
2012 Jan 10
1
Converting BY to a data.frame
Hello,
I am trying to convert BY to a data frame, consider the following example:
exampleDF<-data.frame(a=c(1,2),b=c(10,20),name=c("first","second"))
exampleBY<-by(exampleDF,with(exampleDF,paste(a,b,sep="_")),
function(x) {
data.frame(
name=as.character(x$name),
a=x$a,
2009 May 18
8
Simple plotting errors
Dear R Users,
I have 12 data frames, each of 12 rows and 2 columns.
e.g. FeketeJAN
MEAN SUM_
AMAZON 144.4997874 68348.4
NILE 5.4701955 1394.9
CONGO 71.3670036 21196.0
MISSISSIPPI 18.9273250 6511.0
AMUR 1.8426874 466.2
PARANA 58.3835497 13486.6
YENISEI 1.4668313 592.6
OB 1.4239179 559.6
LENA 0.9342164
2012 Jul 06
1
function on strsplit output
Hi,
I am trying to format some data (example matrix "m" below) for which each data point has 2 associated values separated by a comma.
I want to replace values <3 with "0" to give the example output below.
I have got as far as:
out<-lapply(strsplit(m,","),as.numeric)
Failed to identify anything along the lines of "[out<3]<-0" that works...
Thank
2006 Sep 03
2
Fwd: Dealing with exec?
---------- Forwarded message ----------
From: Kevin Clark <kevin.clark at gmail.com>
Date: 01-Sep-2006 20:31
Subject: Dealing with exec?
To: James Mead <jamesmead44 at gmail.com>
Hey James,
Sorry to bug you. I was curious how you''d handle a call to exec in a
method you were testing. Kernel.stubs(:exec)... doesn''t seem to work
but I''m not sure where else an
2005 Dec 06
3
reading in data with variable length
I have very large csv files (up to 1GB each of ASCII text). I'd like to be able to read them directly in to R. The problem I am having is with the variable length of the data in each record.
Here's a (simplified) example:
$ cat foo.csv
Name,Start Month,Data
Foo,10,-0.5615,2.3065,0.1589,-0.3649,1.5955
2013 Apr 25
3
problems ensuring that a service is absent
Hi,
I''m trying to be really, really sure that a specific service is not
running. The central part of this looks like that:
service { ''foo'': ensure => stopped, enable => false }
->
package { ''foo'': ensure => purged }
The astute reader will notice that on the second run puppet will
complain that the init script for foo is
2011 Feb 04
3
lapply, strsplit, and list elements
Hi there,
I have a problem about lapply, strsplit, and accessing list elements,
which I don't understand or cannot solve:
I have e.g. a character vector with three elements:
x = c("349/077,349/074,349/100,349/117",
"340/384.2,340/513,367/139,455/128,D13/168",
"600/437,128/903,128/904")
The task I want to perform, is to generate a list,
2011 Feb 07
2
Confused
Hi
Im confused by one thing, and if someone can explain it I would be a happy
> rev(strsplit("hej",NULL))
[[1]]
[1] "h" "e" "j"
> lapply(strsplit("hej",NULL),rev)
[[1]]
[1] "j" "e" "h"
Why dossent the first one work? What is it in R that "fails" so to say that
you need to use lapply for it to get
2006 Jan 16
3
new comer's question
I am new to R. I try to search the web but could not find the answer so I
post it here asking for help.
I have a csv file looks like this: (between two ==== lines)
===========================
Machine Name,"Resource, Type","Resource, Sub-type","Resource,
Instance",Date,,Data ->,,,,,,
,0.041666667,,,,,,,,,,,
Time (HH:MM)
2009 Mar 25
5
Subscribe to a recursive file...
Hi All....
I''ve got this configuration to manage bind, I want the exec to be run
whenever anything under /var/named or the file /etc/named.conf gets
updated....
file { "/etc/named.conf":
owner => root,
group => root,
mode => 0644,
require =>
2007 Sep 03
1
Snow on Windows Cluster
Hello,
the package snow is not working on a windows cluster with MPICH2 and
Rmpi. There is an error in makeCluster:
launch failed: CreateProcess(/usr/bin/env
"RPROG="C:\Programme\R\R-2.5.1\bin\R" "OUT=/dev/null" "R_LIBS="
C:/Programme/R/R-2.5.1/library/snow/RMPInode.sh) on 'cl1' failed, error
3 - Das System kann den angegbenen Pfad nicht finden.
I
2008 Nov 24
4
Calculating sum of letter values
Hi all
If I have a string, say "ABCDA", and I want to convert this to the sum of the letter values, e.g.
A -> 1
B -> 2
etc, so "ABCDA" = 1+2+3+4+1 = 11
Is there an elegant way to do this? Trying something like
which(LETTERS %in% unlist(strsplit("ABCDA", "")))
is not quite correct, as it does not count repeated characters. I guess what I need is
2011 Nov 10
2
Removing numbers from a list
I am using gsub to remove numbers for each element of a list. Code is given
below.
testList <- list("this contains a number 1000","this does not contain")
removeNumbers <- function(X)
{
gsub("\\d","",X)
}
outputList <- lapply(testList,removeNumbers)
However, when I try to find the number of words in outputList as follows