similar to: one way to write scripts in R

Displaying 20 results from an estimated 100 matches similar to: "one way to write scripts in R"

2019 Feb 26
5
Improved Data Aggregation and Summary Statistics in R
Dear Developers, Having spent time developing and thinking about how data aggregation and summary statistics can be enhanced in R, I would like to present my ideas/efforts in the form of two commands: The first, which for now I called 'collap', is an upgrade of aggregate that accommodates and extends the functionality of aggregate in various respects, most importantly to work with
2018 Feb 13
3
Help with regular expressions
R 3.4.2 OS X Colleagues I would appreciate some help with regular expressions. I have string that looks like: " ITERATION ,THETA1 ,THETA2 ,THETA3 ,THETA4 ,THETA5 ,THETA6 ,THETA7 ,SIGMA(1,1) ,SIGMA(2,1) ,SIGMA(2,2)? In the entries that
2018 Feb 13
0
Help with regular expressions
Hi Dennis, How about: # define the two values to search for x<-2 y<-3 # create your search string and replacement string repstring<-paste(x,y,sep=",") newstring<-paste(x,y,sep=".") # this is the string that you want to change thetastring<-"SIGMA(2,3)" sub(repstring,newstring,thetastring) [1] "SIGMA(2.3)" Use gsub if you want to change
2018 Feb 13
1
Help with regular expressions
You can either use positive lookahead/lookbehind - but support for that is a bit flaky. Or write a proper regex, and use backreferences to keep what you need. R > x <- "abc 1,1 ,1 1, x,y 2,3 " R > gsub("(\\d),(\\d)", "\\1.\\2", x, perl = TRUE) [1] "abc 1.1 ,1 1, x,y 2.3 " B. > On Feb 12, 2018, at 9:34 PM, Jim Lemon <drjimlemon at
2019 Feb 27
0
Improved Data Aggregation and Summary Statistics in R
Dear Sebastian, Initially I was a bit hesitant to think about yet another way to summarize data, but your illustrations convinced me this is actually a great addition to the toolset currently available in different R packages. Many of us have written custom functions to get the required tables for specific data sets, but this would reduce that effort to simply using the right collap() call. Like
2001 Jan 11
1
lm variable name limit?
gday R gurus, has anyone seen this lm problem? When I add 2 bytes to the variable name (via names), lm returns an error. It's as if there's a limit to the size of the variable names. Any suggestions? thanks, John Strumila > names(y)[12:14] [1] "Log.SQLServer.Locks.RID.Lock.Wait" "Log.SQLServer.Lock" [3] "xxaa"
2003 Mar 10
3
VIM Syntax Highlighting
Has anyone got vim to have syntax highlighting with R function codes? I know there's something similar that works with emacs (ESS or something like that), but I was wondering if anyone knew an equivalent that worked with vim. Thank you, -- []'s mentus at gmx.de Bitte l?cheln! Fotogalerie online mit GMX ohne eigene Homepage!
2019 Feb 27
0
Improved Data Aggregation and Summary Statistics in R
On 26/02/2019 8:25 a.m., Sebastian Martin Krantz wrote: > Dear Developers, > > Having spent time developing and thinking about how data aggregation and > summary statistics can be enhanced in R, I would like to present my > ideas/efforts in the form of two commands: > > The first, which for now I called 'collap', is an upgrade of aggregate that > accommodates and
2008 Jan 11
1
Possible bug in R 2.6.1 (PR#10565)
Colleagues, =20 In using the paste command I have to spell out the collapse option: =20 > paste(1:3,coll=3D"a") [1] "1 a" "2 a" "3 a" > paste(1:3,collapse=3D"a") [1] "1a2a3" =20 My understanding is that the abbreviation coll should be adequate. Actually, even collaps isn't enough: =20
2000 Dec 22
5
(HP-UX) scan: last line gets duplicated (PR#790)
The last line gets duplicated when a file is read like this: a <- scan(file=filename, what="", sep="\n", strip.white=c(TRUE), quiet=TRUE) (This error does not occur on Linux, the only other platform I tested.) Version: platform = hppa2.0-hp-hpux10.20 arch = hppa2.0 os = hpux10.20 system = hppa2.0, hpux10.20 Actually, all binaries are
2003 Aug 17
2
collapse argument on paste
One gets a different response when abbreviating collapse= in paste? In the second case, it appears to be acting as if " + " is just another argument to be pasted. # expected response > paste(c("X","Y"),1:4,sep="",collapse=" + ") [1] "X1 + Y2 + X3 + Y4" # different! >
2012 Dec 16
3
xlim/ylim problem
Hi everybody, just arrived at R and immediately I got a problem. Here's my script: setwd("C:/Users/Tom/Eigene Tools/Programming/R/Data") blast_hits<-read.table("blastHit_covLenght.txt", header=T) blast_hits <- as.matrix(blast_hits) numerical1<-data.matrix(blast_hits, rownames.force = NA)
2013 Jan 27
2
Unexpected behavior with abbreviation of an argument to paste
R 2.15.1 OS X Colleagues, I encountered the following unexpected behavior today: The following command yielded the expected result: paste(c("TEXT1", "TEXT2"), collapse="|") Result: [1] "TEXT1|TEXT2" However, abbreviating "collapse" by even one character: paste(c("TEXT1", "TEXT2"), collaps="|") yielded the
2006 Aug 08
2
Legacy database migration causing problems during testing.
I''m using rails to build some new functionality into an existing website and MySQL database system. I know there are ways to set up models to use the legacy tables and that I should be able to get the application to run properly with the DB in it''s current state. The problem that I am having is the database isn''t translating into a schema that can be inserted into the
2004 Jul 13
2
help with as.function
HI, sorry but i don't understand how to make a function with as.function() formula<-"2+3*x" formu<-as.symbol(formula) > formu 2+3*x formul<-as.function(alist(x=,formu)) curve(formul,1,5,col="blue") Error in xy.coords(x, y, xlabel, ylabel, log) : x and y lengths differ > typeof(formul) [1] "closure" and not plot the curve function, Why?
2012 Mar 17
2
Reading then transposing from file
Hi, I'm an R beginner and I'm struggling with what should be a rudimentary task. My data is along these lines: ID name1 name2 name3 name4 Class 0 1 0 2 Var1 A B C A Var2 B C C A Var3 C A B A etc. I'm using the following: foo <- data.frame(t(read.table("file", header=FALSE))) but of course now it's not using ID, Class, etc. as column names. As you can imagine,
2005 Sep 11
4
[RFC] The Early Demise of Myriad (Thanks To Ruby Threads)
Hi Everyone, I figured out this weekend that Ruby''s Thread implementation causes the Ruby/Event binding I wrote to completely stall and go dead. After reviewing the Ruby source and watching several strace runs, it''s clear that the Ruby Thread implementation uses select in a way that--while not being bad--just isn''t compatible with libevent. The second a thread is
2008 Jul 08
4
Manipulate Data (with regular expressions)
Dear Everyone, I try to automatically manipulate the data of a variable (class = factor) like x 220 220a 221 221b B221 Into two variables (class = numeric) like x y 220 0 220 1 221 0 221 1 221 1 y has to carry the information about the class (number or string) of the former x-Variable. I could do it by hand like x[x == "220a"] <- 220
2007 Sep 25
2
[LLVMdev] Q about instruction pattern matching
On Sep 24, 2007, at 1:12 AM, Andreas Fredriksson wrote: > On 9/24/07, Evan Cheng <evan.cheng at apple.com> wrote: > >> I am going to suggest something shocking. :) Since you will end up >> writing a >> bunch of target specific code anyway, you might a well write a target >> specific pass that change generic instructions into data register >> variant
2007 Sep 29
0
[LLVMdev] Q about instruction pattern matching
On 9/25/07, Evan Cheng <evan.cheng at apple.com> wrote: > > Hi Evan, > > wouldn't this generate fairly terrible code if each address register > > use has to be preceded by instructions to make an address register > > hold the right value? > > No. I would suggest doing this as a instruction selection post pass. > It would operate on DAGs so you still get