similar to: Demo and 00Index problems

Displaying 20 results from an estimated 10000 matches similar to: "Demo and 00Index problems"

2018 Aug 15
5
validspamobject?
Greetings, My R package has been showing warnings of the form: `validspamobject()` is deprecated. Use `validate_spam()` directly None of my code uses the function validspamobject, so it must be a problem in another package I'm calling, possibly spam or spdep. Has this problem occurred with other people? It doesn't have any deleterious effect, but it's annoying. In particular,
2018 Aug 16
1
Thanks for help with validspamobject
Hi, Thanks for all your help. The problem with an error involving validspamobject() has been resolved, as a new version of spdep (0.7-7) was just released and it seems to have stopped using the deprecated function. Ron B. [[alternative HTML version deleted]]
2023 Mar 08
1
Augment base::replace(x, list, value) to allow list= to be a predicate?
That's an interesting example, as it's conceptually similar to what Pavel is proposing, but structurally different. gsubfn() is more complicated than a simple switch in the body of the function, and wouldn't work well as an anonymous function. Multiple dispatch can nicely encompass both of these cases. For replace(), library(S7) replace <- new_generic("replace",
2010 Aug 26
5
Quick GREP challenge
> grep("f[0-9]+=", "f1=5,f22=3,", value = T) [1] "f1=5,f22=3," How do I make the line output c("f1", "f22") instead? (Actually, c(1,22) would be even better). Thank you. -- View this message in context: http://r.789695.n4.nabble.com/Quick-GREP-challenge-tp2339486p2339486.html Sent from the R help mailing list archive at Nabble.com.
2018 Aug 18
0
validspamobject?
Hi, I have submitted an updated R package to CRAN, the only problem seems to be the examples take too long to run on Windows and Debian. Several examples take over 10 seconds and the entire set takes around 110 seconds. However, I don't see what the 'target' amount of time is. How much will this need to be sped up to pass the test? Also, are there some tricks to speeding up
2010 Oct 08
4
function using values separated by a comma
Hello, I have a dataframe (tab separated file) which looks like the example below - two values separated by a comma, and tab separation between each of these. [,1] [,2] [,3] [ ,4] [1,] 0,1 1,3 40,10 0,0 [2,] 20,5 4,2 10,40 10,0 [3,] 0,11 1,2 120,10 0,0 I would like to calculate the percentage of the smallest number separated by the comma by: 1) summing the values e.g. for
2011 Oct 19
4
Using SQL "IN" with RJDBC or RMySQL
Hello, The code below works fine up until I try to use the "IN" statement in the last line. The proper SQL format is: SELECT * FROM this_table WHERE this_column IN (1,2,3,4,5) But, I think I may be getting something like: SELECT * FROM this_table WHERE this_column IN c(1,2,3,4,5) Which makes no sense in SQL. I think it may be just a matter of string massaging, but I'm not
2023 Mar 07
1
Augment base::replace(x, list, value) to allow list= to be a predicate?
This could be extended to sub and gsub as well which gsubfn in the gusbfn package already does: library(gsubfn) gsubfn("^..", toupper, c("abc", "xyz")) ## [1] "ABc" "XYz" On Fri, Mar 3, 2023 at 7:22?PM Pavel Krivitsky <p.krivitsky at unsw.edu.au> wrote: > > Dear All, > > Currently, list= in base::replace(x, list, value)
2011 May 31
1
Comment on build and INSTALL
Greetings, I have noticed two possible small glitches with build and INSTALL. First, when I run R CMD build latticeDensity, I get the following message: *excluding invalid files from 'latticeDensity' Subdirectory R contains invalid file names: R However, all the files end up in the zip file (or tar) just fine, and neither INSTALL
2013 Dec 17
3
In-string variable/symbol substitution: What formats/syntax is out there?
Hi, I'm try to collect a list of methods/packages available in R for doing in-string variable/symbol substitution, e.g. someFcn("pi=${pi}"), anotherFcn("pi=@pi@") and so on becomes "pi=3.141593". I am aware of the following: ** gsubfn() in the 'gsubfn' package, e.g. > gsubfn( , , "pi = $pi, 2pi = `2*pi`") [1] "pi = 3.14159265358979,
2012 Aug 24
1
Error while installing gsubfn_0.6-4.tar.gz for R 2.15.1
Hi, I am getting the follwoing error while installing gsubfn_0.6-4.tar.gz library for R. R version is 2.15.1 and i am installing on Redhat linux version 2.6.18-238.9.1.el5 (mockbuild at x86-002.build.bos.redhat.com<mailto:mockbuild at x86-002.build.bos.redhat.com>) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) * installing to library ?/home/mapred/installables/R/library? * installing
2010 Nov 20
3
how to store package options over sessions?
Hi, I posted this a week ago on r-help but did not get an answer. So I hope that someone here can help me: I want to define some options for my package the user may change. It would be convenient if the changes could be saved when terminating an R session and recovered automatically on the next package load. Is that possible and if yes, is the standard way to implement this? Thanks, Mark
2011 Jun 26
2
String manipulation
Dear all, I have following kind of character vector: Vec <- c("344426", "dwjjsgcj", "123sgdc", "aagha123", "sdh343asgh", "123jhd51") Now I want to split each element of this vector according to?numeric?and string element. For example in the 1st element of that vector, there is no string element. Therefore I should get a vector of
2010 Oct 26
2
Formatting durations
Hi, I am working with a dataset for sometime and I need some help in parsing some data. There is a column called "Duration" which has data like following: 2 minutes => 120 2 min => 120 10 seconds =>10 2 hrs =>7200 2-3 minutes => 150 or 120 5 minutes (when i arrived => 300 Flyby approx 20 sec. => 20 felt like 10 mins but tim => 600 I need to convert them to
2010 Oct 29
2
Differenciate numbers from reference for rows
So, I am having a tricky reference file to extract information from. The format of the file is x 1 + 4 * 3 + 5 + 6 + 11 * 0.5 So, the elements that are not being multiplied (1, 5 and 6) and the elements before the multiplication sign (4 and 11) means actually the reference for the row in a matrix where I need to extract the element from. The numbers after the multiplication sign are regular
2011 Apr 07
2
replace an expression with its value, or read macros
I know my subject line seems odd, but I want to replace an expression—such as a variable—with its value. For example, I want to paste() some strings together, assign the result to a variable s, then use the value of s as a variable to hold another value. Something like this: import_subjects <- function (start, iterations) { for (i in 1:iterations) { # iterate from start to end s <-
2011 Feb 01
3
R string help
Dear R guru: If I got a variable aaa<- "up.6.11(16)" how can I extract 16 out of the bracket? I could use substr, e.g. substr(aaa, start=1, stop=2) [1] "up" But it needs start and stop, what if my start or stop is not fixed, I just want the number inside the bracket, how can I achieve this? Many thanks yan
2012 Mar 07
3
GPS handling libraries or (String manipulation)
Dear all, I would like to ask you if R has a library that can work with different GPS formats For example  I have a string of this format N50° 47.513 E006° 03.985 and I would like to convert to GPS decimal format. that means for example converting the part N50° 47.513 to 50 + 47/60 + 513/3600. Is it possible to do that with R? What is the name of such a library? I would like to thank you in
2010 Oct 13
5
Regular expression to find value between brackets
Hi, this should be an easy one, but I can't figure it out. I have a vector of tests, with their units between brackets (if they have units). eg tests <- c("pH", "Assay (%)", "Impurity A(%)", "content (mg/ml)") Now I would like to hava a function where I use a test as input, and which returns the units like: f <- function (x) sub("\\)",
2011 May 26
4
Applying "toupper" to only portions of text strings
Colleagues Assume that I have a vector containing some text strings, some of which contain a particular character. I could like to apply "toupper" to the text before the character. For example (in this case, "|" is the particular character): ORIGINAL: TEXT <- c("aaaa", "bbb|cc", "|ddd") AFTER APPLICATION OF toupper: TEXT <-