Displaying 20 results from an estimated 10000 matches similar to: "[WISH / PATCH] possibility to split string literals across multiple lines"
2017 Jun 14
4
[WISH / PATCH] possibility to split string literals across multiple lines
On Wed, 14 Jun 2017 06:12:09 -0500, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> On 14/06/2017 5:58 AM, Andreas Kersting wrote:
> > Hi,
> >
> > I would really like to have a way to split long string literals across
> > multiple lines in R.
>
> I don't understand why you require the string to be a literal. Why not
> construct the long
2017 Jun 14
2
[WISH / PATCH] possibility to split string literals across multiple lines
Mark, that's actually a fair statement, although your extra operator
doesn't cause construction at parse time. You still call paste0(), but just
add an extra layer on top of it.
I also doubt that even in gigantic loops the benefit is going to be
significant. Take following example:
atestfun <- function(x){
y <- paste0("a very long",
"string for
2017 Jun 14
2
[WISH / PATCH] possibility to split string literals across multiple lines
I don't think it is reasonable to change the parser this way. This is
currently valid R code:
a <- "foo"
"bar"
and with the new syntax, it is also valid, but with a different
meaning. Or you can even consider
a <- "foo"
bar %>% func() %>% print()
etc.
I like the idea of string literals, but the C/C++ way clearly does not
work. The Python/Julia way
2017 Jun 14
0
[WISH / PATCH] possibility to split string literals across multiple lines
Having some line-breaking character for string literals would have benefits
as string literals can then be constructed parse-time rather than run-time.
I have run into this myself a few times as well. One way to at least
emulate something like that is the following.
`%+%` <- function(x,y) paste0(x,y)
"hello" %+%
" pretty" %+%
" world"
-Mark
Op wo 14 jun.
2017 Jun 14
0
[WISH / PATCH] possibility to split string literals across multiple lines
If you are changing the parser (which is a major change) you
might consider treating strings in the C/C++ way:
char *s = "A"
"B";
means the same as
char *s = "AB";
I am not a big fan of that syntax but it is widely used.
A backslash at the end of the line leads to errors when you accidently
put a space after the backslash and the editor
2017 Jun 14
0
[WISH / PATCH] possibility to split string literals across multiple lines
As I recall this has been discussed at least a few times (unfortunately I'm traveling so can't check the references), but the justification was never satisfactory.
Personally, I wouldn't mind string continuation supported since it makes for more readable code (I had one of my packages raise a NOTE in examples because there is no way in R to split a long hash into multiple lines), but
2017 Jun 15
0
[WISH / PATCH] possibility to split string literals across multiple lines
On Wed, 14 Jun 2017, G?bor Cs?rdi wrote:
> I don't think it is reasonable to change the parser this way. This is
> currently valid R code:
>
> a <- "foo"
> "bar"
>
> and with the new syntax, it is also valid, but with a different
> meaning. Or you can even consider
>
> a <- "foo"
> bar %>% func() %>% print()
>
>
2017 Jun 14
0
[WISH / PATCH] possibility to split string literals across multiple lines
I know it doesn't cause construction at parse time, and it was also not
what I said. What I meant was that it makes the syntax at least look a
little as if you have a line-breaking character within string literals.
Op wo 14 jun. 2017 om 14:18 schreef Joris Meys <jorismeys at gmail.com>:
> Mark, that's actually a fair statement, although your extra operator
> doesn't cause
2017 Jun 14
0
[WISH / PATCH] possibility to split string literals across multiple lines
On 14/06/2017 6:45 AM, Andreas Kersting wrote:
> On Wed, 14 Jun 2017 06:12:09 -0500, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
>
>> On 14/06/2017 5:58 AM, Andreas Kersting wrote:
>>> Hi,
>>>
>>> I would really like to have a way to split long string literals across
>>> multiple lines in R.
>>
>> I don't understand why
2017 Jun 14
0
[WISH / PATCH] possibility to split string literals across multiple lines
On 14/06/2017 5:58 AM, Andreas Kersting wrote:
> Hi,
>
> I would really like to have a way to split long string literals across
> multiple lines in R.
I don't understand why you require the string to be a literal. Why not
construct the long string in an expression like
paste0("aaa",
"bbb")
? Surely the execution time of the paste0 call is
2006 Jun 18
2
analyze amino acid sequence (composition)of proteins
Dear R-helpers:
thank your for your attention.
i am a newer to R and i am doing some protein category classification based on
the amino acid sequence.while i have some questions urgently.
1. any packages for analysis amino acid sequence
2. given two sequences "AAA" and "BBB",how can i combine them into "AAABBB"
3. based on "AAABBB",how can i get some
2006 Jun 18
1
about the analysis of strings, thanks
Dear R-helpers:
thank your for your attention.
i am a newer to R and i am doing some protein category classification based on
the amino acid sequence.while i have some question urgent.
1. any packages for analysis amino acid sequence
2. given two sequences "AAA" and "BBB",how can i combine them into "AAABBB"
3. based on "AAABBB",how can i get some
2004 May 05
3
sip.conf and SIP client host= not recognized in some cases
I am seeing an issue with getting certain sip devices to be recognized as
defined SIP clients host= in the sip.conf and the only deference that I can
find btw sources that work and don't work is that devices that send packets
with an Initial Via header of themselves appears to work and pick the
context correctly but those that don't have the Via just get dropped in the
context of the
2012 Apr 17
3
Can a matrix have 'list' as rows/columns?
After a lot of processing I get a matrix into M. I expected each row and
column to be a vector. But it is a list.
R-Inferno says...
"Arrays (including matrices) can be subscripted with a matrix of positive
numbers. The subscripting matrix has as many columns as there are dimensions
in the array—so two columns for a matrix. The result is a vector (not an
array)
containing the selected
2010 Nov 30
2
xyplot : superimposed 2 groups in different panels
Hello,
I would like to plot the following xyplot : for each date of fff (1 date per
panel), bbb=f(aaa) for the two groups (ddd=1 and ddd=2) superimposed.
I can do it by group (see below) but not together.
I looked at http://lmdvr.r-forge.r-project.org/figures/figures.html but I
haven't found what I was looking for (to be honest, I haven't understood all
the examples).
Any help will be
2014 Feb 11
2
Some LDA questions!
Hi there!
I have been setuped exim and dovecot.
Exim uses dovecot-lda to deliver mails to mailbox.
Some configurations of exim:
dovecot_virtual_delivery:
? driver = pipe
? command = /usr/libexec/dovecot/dovecot-lda -d $local_part@$domain -f $sender_address
? message_prefix =
? message_suffix =
? delivery_date_add
? envelope_to_add
? return_path_add
? log_output
? user = vmail
? group = vmail
?
2008 Aug 29
1
nls() fails on a simple exponential fit, when lm() gets it right?
Dear R-help,
Here's a simple example of nonlinear curve fitting where nls seems to get
the answer wrong on a very simple exponential fit (my R version 2.7.2).
Look at this code below for a very basic curve fit using nls to fit to (a)
a logarithmic and (b) an exponential curve. I did the fits using
self-start functions and I compared the results with a more simple fit
using a straight lm()
2010 Mar 05
1
About the interaction A:B
Suppose, 'fr' is data.frame with columns 'Y', 'A' and 'B'. 'A' has levels 'Aa'
'Ab' and 'Ac', and 'B' has levels 'Ba', 'Bb', 'Bc' and 'Bd'. 'Y'
columns are numbers.
I tried the following three sets of commands. I understand that A*B is
equivalent to A+B+A:B. However, A:B in A+B+A:B is
2006 Oct 10
1
error in dput applied to dataframe (PR#9286)
Full_Name: Daniel F Higgins
Version: 2.4.0
OS: Windows XP and Mac OSX
Submission from: (NULL) (128.111.242.49)
Create a dataframe as indicated below and apply 'dput' to it; note that the
row.names attribute is incorrect!
> aaa <- c("AAA","BBB","AAA")
> bbb <- c(1,2,3)
> df <- data.frame(aaa,bbb)
> dput(df)
structure(list(aaa =
2011 Mar 08
1
How to sort using a predefined criterion
Dear R helpers,
Suppose I have following data.frame.
df <- data.frame(category = c("treat_A", "treat_A", "treat_A", "treat_A", "treat_A", "treat_A", "treat_A", "treat_A", "treat_B", "treat_B", "treat_B", "treat_B", "treat_B", "treat_B",