Important to notice: this seems to be an issue only with an unordered
factor on the X axis. When the variable is numeric or an ordered factor,
then it works as described in Help.
On Thu, Jul 27, 2017 at 11:58 AM, Dimitri Liakhovitski <
dimitri.liakhovit...@gmail.com> wrote:
> Š¢hank
y brevity.
>
> On July 27, 2017 8:18:03 AM PDT, Dimitri Liakhovitski <
> dimitri.liakhovit...@gmail.com> wrote:
> >Thank you, Bert!
> >
> >I do NOT have an object named "T" in scope (I checked - and besides, it
> >would never occur to me to use th
Jeff Newmiller
wrote:
> I suspect this is by design. Questions about "why" should probably cc the
> contributed package maintainer(s).
> --
> Sent from my phone. Please excuse my brevity.
>
> On July 27, 2017 7:49:47 AM PDT, Dimitri Liakhovitski <
> dimitri.liakhovit
it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
> On Thu, Jul 27, 2017 at 7:49 AM, Dimitri Liakhovitski
> wrote:
> > To clarify: my question is not about "who could I exclude NAs from being
> > counted" - I know how
To clarify: my question is not about "who could I exclude NAs from being
counted" - I know how to do that.
My question is: Why na.rm = T is not working for geom_bar in this case?
On Thu, Jul 27, 2017 at 8:24 AM, Dimitri Liakhovitski <
dimitri.liakhovit...@gmail.com> wrote:
&
lot(data = md, mapping = aes(x = a)) +
geom_bar(na.rm = T)
But I still have NAs in the picture. Why?
What am I missing?
Thank you!
--
Dimitri Liakhovitski
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE
://www.R-project.org/
>>>
>> posting-guide.html
>>
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>
>> --
>> Peter Dalgaard, Professor,
>> Center for Statistics, Copenhagen Business School
>> Solbje
_
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-conta
51 PM, Jeff Newmiller
wrote:
> If you are still wondering, try re-reading my answer. FALSE is more
> efficient, TRUE is sorted. Lack of sorting has nothing to do with preserving
> order.
> --
> Sent from my phone. Please excuse my brevity.
>
> On March 8, 2017 8:55:06 AM
ordering afterward, or you can roll your own
> possibly-less-efficient merge using match and indexing:
>
> info[ match( grades2$grade, info$grade ), ]
> --
> Sent from my phone. Please excuse my brevity.
>
> On March 8, 2017 8:07:27 AM PST, Dimitri Liakhovitski
> wrote:
>
I have in info:
This solution resorts everything in the order of column 'grade':
merge(grades2, info, by = "grade", all.x = T, all.y = F)
Could you please explain why this solution also resorts - despite sort = FALSE?
merge(grades2, info, by = "gr
e(temp[word])
}
return(paste(temp, collapse = ""))
}
The next 4 lines return the same thing:
metaphone("netflix")
metaphone("net flex")
mymetaphone("netflix")
mymetaphone("net flex")
Dimitri
On Wed, Dec 14, 2016 at 2:35 PM, Dimitri Liakhovitski
;NTFL"
mymetaphone("net flex") # returns "NTFLKS"
Why such a difference between DoubleMetaphone("net flex")$primary and
mymetaphone("net flex")?
Why isn't DoubleMetaphone("net flex")$primary returning "NTFLKS"?
Thank you!
--
Dimi
c("Var2", "Var1")]
> mapply(function(x, y) paste(vec[x:y], collapse=" "),
> x=idx[, 1], y=idx[, 2])
> }
>
> David C
>
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of David L
&
vector"
> [10] "vector"
>
> This makes a vector of strings but if you want a list use as.list(mapply())
>
> David L. Carlson
> Department of Anthropology
> Texas A&M University
>
>
>
> -Original Message-
> From: R-help [mailto:r-help-bo
Hello!
I have a vector of strings 'x' that was based on a longer string
'mystring' (the actual length of x is unknown).
mystring <- "this is my vector"
x <- strsplit(mystr, " ")[[1]]
I am looking for an elegant way of creating an object (e.g., a list)
that contains the following strings:
"this"
s reply, even the official R distribution comes with no
> warranty, and that will be the case with most OSS.
>
> Regards,
>
> Marc
>
>
>> On Dec 8, 2016, at 12:08 PM, Dimitri Liakhovitski
>> wrote:
>>
>> Thank you, Marc.
>> That's helpf
hu, Dec 8, 2016 at 10:05 AM, Dimitri Liakhovitski
> wrote:
>> I just thought maybe there is something - about the process of
>> submitting packages or anything like that - that shows that at least
>> some diligence is being done to ensure that a given package is not
>>
sured
> that all "official" R packages have been "vetted" and are safe?
>
> Thanks a lot!
>
> --
> Dimitri Liakhovitski
>
>
>
> Dimitri,
>
> You are going to need to define "safe".
>
> Also, note that the notion of "official
with ABSOLUTELY NO WARRANTY."
>
> Don't think it could be clearer than that!
>
> Cheers,
> Bert
>
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley
Guys,
suddenly, I am being asked for a proof that R packages that are not
'"base" are safe. I've never been asked this question before.
Is there some documentation on CRAN that discusses how it's ensured
that all "official" R packages have been "vetted&qu
and discovered that
DoubleMetaphone can't process non-ASCII characters (like Umlauts in
German, accents in French).
What would you recommend I use instead?
Use 'phonetic' from stringdist?
Thank you!
--
Dimitri Liakhovitski
__
R-help@r-project.org
t in the second case?
Thanks a lot!
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
a
Thank you, Peter!
On Wed, Nov 16, 2016 at 4:21 PM, peter dalgaard wrote:
>
>> On 16 Nov 2016, at 21:58 , Dimitri Liakhovitski
>> wrote:
>>
>> Hello!
>>
>> I need to calculate the maximum of each row of a data frame.
>> This works:
>>
>
gt; do.call(pmax, c(x, na.rm=TRUE))
> [1] 111 112 113 114 15
>
> On Wed, Nov 16, 2016 at 3:58 PM, Dimitri Liakhovitski
> wrote:
>> Hello!
>>
>> I need to calculate the maximum of each row of a data frame.
>> This works:
>>
>> x <- data.frame(a =
To clarify:
I know I could do:
apply(x, 1, max, na.rm = T)
But I was wondering if one can modify the pmax one...
On Wed, Nov 16, 2016 at 3:58 PM, Dimitri Liakhovitski
wrote:
> Hello!
>
> I need to calculate the maximum of each row of a data frame.
> This works:
>
> x <-
non-NAs in each row:
x <- data.frame(a = c(1:5), b=11:15, c=c(111:114,NA))
x
I'd like it to return:
[1] 111 112 113 114 15
Thanks a lot!
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
http
operation is performed column-wise:
>
> t(y * t(x))
>
> Hope this helps,
>
> Rui Barradas
>
>
> Em 03-11-2016 21:05, Dimitri Liakhovitski escreveu:
>>
>> Hello!
>>
>> I have a matrix x and a vector y:
>>
>> x <- matrix(1:6, ncol = 2)
>>
>>> sweep(x, 2, y, "*")
>> [,1] [,2]
>> [1,]2 12
>> [2,]4 15
>> [3,]6 18
>>>
>>
>>
>> On Thu, Nov 3, 2016 at 5:05 PM, Dimitri Liakhovitski
>> wrote:
>>> Hello!
>>>
>>> I h
Or I could repeat each element of y and multiply two matrices - that's better:
rep.row<-function(x,n){
matrix(rep(x,each=n),nrow=n)
}
y <- rep.row(y, nrow(x))
x * y
However, maybe there is a more elegant r-like way of doing it?
Thank yo
Thank you very much, gentlemen!
On Tue, Jul 26, 2016 at 5:48 PM, peter dalgaard wrote:
>
>> On 26 Jul 2016, at 23:28 , Dimitri Liakhovitski
>> wrote:
>>
>> Hello!
>>
>> I have a string x:
>> x <- c("x - 84", "y - 293.04",
Hello!
I have a string x:
x <- c("x - 84", "y - 293.04", "z = 12.5")
I want to remove all the non-numeric stuff from it. The following works:
gsub("[^0-9]", "", x)
However, it strips my numbers of "."
Help - how could I do the same
a frame?
Thanks!
On Fri, Jan 22, 2016 at 11:34 AM, Dimitri Liakhovitski
wrote:
> Hello!
>
> # I have a data frame x:
> x <- data.frame(a = 1:10, b = 2:11, c = 3:12, other = rnorm(10))
>
> # First, I need to change every value 7 in columns a:c to 4
> # Then, I need t
Hello!
# I have a data frame x:
x <- data.frame(a = 1:10, b = 2:11, c = 3:12, other = rnorm(10))
# First, I need to change every value 7 in columns a:c to 4
# Then, I need to decrease by 1 all values in columns a:c that are >7
What would be the fastest way of doing it?
Thank you!
--
D
har", names(x))])
> newx <- x
> newx$char <- row(y)[y==1]
>
> # merge and define winner
> res <- merge(newx, info2)
> res$winner <- with(res, ifelse(char==val, 1, 0))
> res
>
>
> On Wed, Dec 23, 2015 at 3:35 PM, Dimitri Liakhovitski
> wrote:
>>
mber of games and the number of sets per game.
# However, we can assume that the number of sets per game is always the same,
# and the number of players per set is always the same.
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNS
and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
> On Tue, Dec 22, 2015 at 3:03 PM, Marc Schwartz wrote:
>>
>>> On Dec 22, 2015, at 4:42 PM, Dimitri Liakhovitski
>>> wrote
# I have a matrix x:
k <- 20
N <- 5
set.seed(123)
x <- matrix(c(sample(1:k, N, replace = F),
sample(1:k, N, replace = F),
sample(1:k, N, replace = F),
sample(1:k, N, replace = F),
sample(1:k, N, replace = F),
sample(1:k, N, repl
Taking it back - no need for all.x = T, all.y = F
On Tue, Dec 22, 2015 at 3:56 PM, Dimitri Liakhovitski
wrote:
> Actually, the correct merge line should be:
> my.merge <- merge(myinfo, mydata, by="version", all.x = T, all.y = F)
>
> On Tue, Dec 22, 2015 at 3:50 PM, Dimi
Actually, the correct merge line should be:
my.merge <- merge(myinfo, mydata, by="version", all.x = T, all.y = F)
On Tue, Dec 22, 2015 at 3:50 PM, Dimitri Liakhovitski
wrote:
> You are right, guys, merge is working. Somehow I was under the
> erroneous impression that beca
erge
my.merge <- merge(myinfo, mydata, by="version")
names(my.merge)
result2 <- my.merge[,c("myid", "version", "a", "b", "c", "d")]
names(result2)
result2.order <- arrange(result2, myid, version, a, b, c, d)
dim(result2.or
> What is the problem that you are trying to solve?
> Tell me what you want to do, not how you want to do it.
>
> On Tue, Dec 22, 2015 at 12:27 PM, Dimitri Liakhovitski
> wrote:
>>
>> Hello!
>> I have a solution for my task that is based on a loop. However, it
] <- myinfo[myinfo$version == result[[i]]$version, ]
result[[i]]$myid <- id
result[[i]] <- result[[i]][c(5, 1:4)]
}
result <- do.call(rbind, result)
head(result) # This is the desired result
--
Dimitri Liakhovitski
__
R-help@r-pr
t; aggregate() calls its FUN with each column of a data.frame as the argument.
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
> On Tue, Dec 8, 2015 at 3:08 PM, Dimitri Liakhovitski
> wrote:
>>
>> Sorry, I omitted the first line:
>>
>> myvars <
by=iris[,"Species", drop=FALSE], FUN=mean)
>
> provide the answers I would expect. If you want clearer advice, you
> need to provide an actually reproducible example, and tell us more
> about what you expect to get.
>
> Sarah
>
>
> On Tue, Dec 8, 2015 at 5:30 PM, Dimi
;Species"], FUN = var)
by(data = iris[myvars], INDICES = iris["Species"], FUN = max)
by(data = iris[myvars], INDICES = iris["Species"], FUN = min)
by(data = iris[myvars], INDICES = iris["Species"], FUN = sd)
by(data = iris[myvars],
the development version of rio
> (https://github.com/leeper/rio) has an (non-exported) function for
> cleaning up meta data from haven imports. See
> https://github.com/leeper/rio/blob/master/R/utils.R#L86
>
> Best,
> Ista
>
> On Thu, Nov 12, 2015 at 8:37 PM, Dimitri Liakh
1 2
And I actually need to be able to identify if label is empty.
Thank you for looking into it!
Dimitri
On Thu, Nov 12, 2015 at 5:55 PM, Dimitri Liakhovitski
wrote:
> Looks like a little bug in 'haven':
>
> When I actually look at the att
057?
Or should there also be an intercept present in this formula?
I did not specify any intercepts anywhere in my model?
If there should be an intercept, then where can I find it in the object sem1?
Thanks a lot!
--
Dimitri Liakhovitski
__
R-help@r
ny suggestions?
Thanks!
On Thu, Nov 12, 2015 at 11:56 AM, Dimitri Liakhovitski
wrote:
> Hello!
>
> I don't have an example file, but I think my question should be clear
> without it.
> I have an SPSS file. I read it in using 'haven':
>
> library(haven)
>
VERY/SOMEWHAT FAMILIAR" "NOT AT ALL FAMILIAR"
Question: How could I avoid the extraction of the Value Labels for the
columns that have no long labels?
Thank you very much!
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list --
Thank you, Duncan.
Indeed those packages were sitting in a temp directory.
I had to install them manually from a 'zip file.
On Thu, Nov 5, 2015 at 2:40 PM, Duncan Murdoch wrote:
> On 05/11/2015 1:00 PM, Dimitri Liakhovitski wrote:
>>
>> I am using a windows laptop, R 3.2.2
&g
v 5, 2015 at 2:00 PM, Dimitri Liakhovitski
wrote:
> I am using a windows laptop, R 3.2.2
>
> I am using R-gui.
>
> When I go to Packages -> Update packages and then select a Cran mirror
> (in the US) - it tells me to update the following packages:
>
> GLMMGibbs
> RDCO
I didn't just update them.
What could be the reason? I tried to totally delete the folders of
those packages, install them from scratch (successfully), still - they
keep appearing in Update Pacakges widnow.
Any advice?
Thank you!
--
Dimitri Liakhovitski
___
ar1/var2
With df's of weighted n1-1 for group 1 and weighted n2-1 for group 2?
Would it be kosher from statistical perspective?
Thanks a lot!
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://s
#x27;s output for a call to table.
>
> xtabs(formula = ~a + b, data = x, na.action = na.pass, exclude = NULL)
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
>
> On Wed, Sep 30, 2015 at 7:56 AM, Dimitri Liakhovitski
> wrote:
>> Please help:
>>
>> #
x27;t figure out how to force xtabs to include NAs.
# All my attempts below fail to include NAs:
xtabs(~ a + b, x, na.action(na.pass))
xtabs(~ a + b, x, na.action = "na.pass")
xtabs(~ a + b, x, na.action(na.pass(x)))
xtabs(~ a + b, x, exclude = NULL)
Th
SE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://s
ter(complete.cases(.))
But this command doesn't work:
filter(mydata, complete.cases(.))
Error: object '.' not found
Why doesn't it work?
Thank you!
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and
ttp://harvest.nps.edu
>
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Berend
> Hasselman
> Sent: Friday, September 18, 2015 1:30 AM
> To: Dimitri Liakhovitski
> Cc: r-help
> Subject: Re: [R] Hep with regex! - combination of ^,
For the last one, looks like this one works:
x[grep("^(q10|q12).*\\_1$", x)]
On Thu, Sep 17, 2015 at 5:46 PM, Dimitri Liakhovitski
wrote:
> Duncan,
> Of course my verbal descriptions and my code don't match my regexp -
> otherwise I wouldn't be asking the question
/2015 5:11 PM, Dimitri Liakhovitski wrote:
>> (x <- c("q10_1", "q10_2", "q10_11", "q12_1", "q12_2", "q13_1", "q13_11"))
>>
>> # Which strings start with "q10" or "q12? - WORKS
>> x[grep
[grep("1$", x)]
# Which strings end with "_1"? - WORKS
x[grep("\\_1$", x)]
# Which strings start with "q10" AND contain a "1"? - WORKS
x[grep("^q10.+1", x)]
# Which strings start with "q10" AND end with a "_1"
Hello,
I know how to read in mp3 files, e.g., using tuneR.
But is it possible to read in a .wav file - as below and then compress
it to mp3 format?
library(tuneR)
mywav <- readWave("myfile.wav")
Thanks a lot for any hints!
--
Dimitri
t;Data is not information. Information is not knowledge. And knowledge
> is certainly not wisdom."
> -- Clifford Stoll
>
>
> On Mon, Jul 27, 2015 at 2:32 PM, Dimitri Liakhovitski
> wrote:
>> With NAs it'd be:
>>
>> rk <- c(2,NA,4,3,1, NA)
>>
With NAs it'd be:
rk <- c(2,NA,4,3,1, NA)
outer(rk, rk, "<") + 0
Wow, I still can't believe it - just one line!
On Mon, Jul 27, 2015 at 5:31 PM, Dimitri Liakhovitski
wrote:
> Wow!
>
> On Mon, Jul 27, 2015 at 5:28 PM, Bert Gunter wrote:
>> ## I leav
[3,]0100
> [4,]1110
>
>
>
> Cheers,
> Bert
>
> Bert Gunter
>
> "Data is not information. Information is not knowledge. And knowledge
> is certainly not wisdom."
>-- Clifford Stoll
>
>
> On Mon, Jul 27, 2015 at 12:38
elegant way?
Thank you very much!
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.htm
s1, attr_default, "label", NA_character_)
>
> (code untested, but you get the idea)
>
> Hadley
>
> On Mon, Jul 20, 2015 at 8:56 AM, Dimitri Liakhovitski
> wrote:
>> Hadley,
>>
>> you've added function labelled to haven, which is great. However,
a labels.
When I run lapply(spss1, attr, "label") I see under those 2 variables
"NULL" - which is true and valid.
However, would it be possible to have instead of NULL an NA? This way
the length of varnames and mylables would the same and one could put
them side by side (e.g., in
knowledge. And knowledge
> is certainly not wisdom."
>-- Clifford Stoll
>
>
> On Thu, Jul 16, 2015 at 8:37 AM, Dimitri Liakhovitski
> wrote:
>> Unfortunately not - more like 0.7654, 1.2345.
>> I understand that I could multiply each number by 100, round it t
:
>
> On Jul 16, 2015, at 8:10 AM, Dimitri Liakhovitski wrote:
>
>> Is there an R package that allows one to calculate skewness and
>> curtosis - but weighted with individual level weights (one weight per
>> observation)?
>>
>
> Integer weights?
>
&
Is there an R package that allows one to calculate skewness and
curtosis - but weighted with individual level weights (one weight per
observation)?
Thank you!
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more
I found the answer:
md %>% group_by(device1, device2) %>% summarise_each(funs(mean(.,
na.rm = TRUE)))
On Thu, Jun 25, 2015 at 4:35 PM, Dimitri Liakhovitski
wrote:
> Just want to clarify - I know how to do it using base R. I just want
> to figure out how to do it in dplyr. This i wh
(dplyr)
> md %>% group_by(device1, device2) %>% summarise_each(funs(mean))
>
> However, I am getting some NAs. I want the NAs to be ignored (na.rm =
> TRUE) - I tried, but the function doesn't want to accept this
> argument.
> Both these lines result in error:
>
>
o be ignored (na.rm =
TRUE) - I tried, but the function doesn't want to accept this
argument.
Both these lines result in error:
md %>% group_by(device1, device2) %>% summarise_each(funs(mean),
na.rm = TRUE)
md %>% group_by(device1, device2) %>% summarise_each(funs(mean,
na.rm
Thank you guys - it's a great learning: 'summarise_each' and 'funs'
On Tue, Jun 16, 2015 at 3:47 PM, Hadley Wickham wrote:
> On Tue, Jun 16, 2015 at 12:24 PM, Dimitri Liakhovitski
> wrote:
>> Hello!
>>
>> I have a data frame:
>>
>> m
.edu
> Department of Ecology VOICE: (360) 407-6815
> PO Box 47600FAX:(360) 407-7534
> Olympia, WA 98504-7600
>
> USPS: PO Box 47600, Olympia, WA 98504-7600
> Parcels:300 Desmond Drive, Lacey, WA 98503-1274
&g
NA
md[4,1] <- NA
md
vapply(md[myvars], function(x) sum(x==5,na.rm=TRUE),1L)
But the result should be by device.
On Tue, Jun 16, 2015 at 1:56 PM, Dimitri Liakhovitski
wrote:
> Thank you, Bert.
> I'll be honest - I am just learning dplyr and was wondering if one
> could do it in dplyr.
&
t;
> Cheers,
> Bert
>
> Bert Gunter
>
> "Data is not information. Information is not knowledge. And knowledge is
> certainly not wisdom."
>-- Clifford Stoll
>
> On Tue, Jun 16, 2015 at 10:24 AM, Dimitri Liakhovitski
> wrote:
>>
>> Hello!
>>
300 Desmond Drive, Lacey, WA 98503-1274
>
>
> On Tue, 16 Jun 2015, Dimitri Liakhovitski wrote:
>
>> Hello!
>>
>> I have a data frame:
>>
>> md <- data.frame(a = c(3,5,4,5,3,5), b = c(5,5,5,4,4,1), c =
>> c(1,3,4,3,5,5),
>> device =
) - so that I can't specify those counts.a,
counts.b, etc. manually - dozens of times.
Does dplyr allow to run the count of 5s on all 'myvars' columns at once?
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNSUBSCR
")))
>
> Duncan
>
> Duncan Mackay
> Department of Agronomy and Soil Science
> University of New England
> Armidale NSW 2351
> Email: home: mac...@northnet.com.au
>
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Di
= as.character(x$b)
x
str(x)
I need to produce this data frame:
1 a
1 b
1 c
2 d
2 e
3 f
Is it possible without looping?
Thank you!
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch
f happiness: Part 2."
>> b = "What a nice day today: Story of happiness (Part 2)"
>> sa = gsub("[^A-Za-z0-9]", "", a)
>> sb = gsub("[^A-Za-z0-9]", "", b)
>> a==b
>> # [1] FALSE
>> sa==sb
>> # [1] TR
I think I found a partial answer:
str_replace_all(x, "[[:punct:]]", " ")
On Mon, Apr 20, 2015 at 9:59 AM, Dimitri Liakhovitski
wrote:
> Hello!
>
> Please point me in the right direction.
> I need to match 2 strings, but focusing ONLY on characters, ignor
ppiness: Part 2." ==
"What a nice day today: Story of happiness (Part 2)"
--
Thank you!
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
IMDB. I guess I'll just have to open it as any text file.
On Tue, Apr 14, 2015 at 4:48 PM, Sarah Goslee wrote:
> What produced this file?
>
> On Tue, Apr 14, 2015 at 4:40 PM, Dimitri Liakhovitski
> wrote:
>> Is it possible to read a LIST file into R? Any package?
>&g
Is it possible to read a LIST file into R? Any package?
I've done some googling, but there are just too many hits for a regular 'list'.
Appreciate any pointers!
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNSUB
es=c("yellow","red"),na.color="white")
>
> Jim
>
>
> On Fri, Apr 3, 2015 at 8:08 AM, Dimitri Liakhovitski
> wrote:
>>
>> Jean, I think I fixed it:
>>
>> newpal <- colorRamp(c("yellow", "red"))
>> missin
nal$Mean.Wait,
na.rm=T)), maxColorValue=255))
map('county', fill=TRUE, col=newcol,
resolution=0, lty=0, bg="transparent")
map('state', lwd=1, add=TRUE)
One understanding question: what exactly does this rgb line do and why
do we have to say "maxColorValue=255
ol,
> resolution=0, lty=0, bg="transparent")
> map('state', lwd=1, add=TRUE)
>
> Jean
>
>
> On Thu, Apr 2, 2015 at 12:03 PM, Dimitri Liakhovitski
> wrote:
>>
>> I have a data frame 'mydata.final' (see below) that contains U
in 'wait':
map('county', fill = TRUE, col = allcolors[mydata.final$wait],
resolution = 0, lty = 0, bg = "transparent")
map('state', lwd=1, add=TRUE)
My goal is: instead of splitting 'Mean.Wait' into 5 ordered categories
frame(a=1:10,b=2:11,c=c(1,NA,3,NA,5,NA,7,NA,NA,10))
> > x[is.true(x$c >= 6), ]
> a b c
> 7 7 8 7
> 10 10 11 10
>
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
> On Fri, Feb 27, 2015 at 7:27 AM, Dimitri Liakhovitski
> wrote:
>&g
Thank you very much, Duncan.
All this being said:
What would you say is the most elegant and most safe way to solve such
a seemingly simple task?
Thank you!
On Fri, Feb 27, 2015 at 10:02 AM, Duncan Murdoch
wrote:
> On 27/02/2015 9:49 AM, Dimitri Liakhovitski wrote:
>> So, Dun
, but I'll replace all the values in this row with NAs?
On Fri, Feb 27, 2015 at 9:13 AM, Duncan Murdoch
wrote:
> On 27/02/2015 9:04 AM, Dimitri Liakhovitski wrote:
>> I know how to get the output I need, but I would benefit from an
>> explanation why R behaves the way it doe
ith NAs?
x[x$c<6,] # Leaves rows with c=NA, but makes the whole row an NA. Why???
x[(x$c<6) | is.na(x$c),] # output I need - I have to be super-explicit
Thank you very much!
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UN
unding box to center/zoom specification. (experimental)
Does it mean that there is no way for me to create a map with these
exact corners?
Thank you!
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https:/
.c2 2 b c2 3 2
> 3.c2 3 c c2 4 3
> 4.c2 4 d c2 5 4
> 5.c2 5 e c2 6 5
> 1.c3 1 a c3 3 1
> 2.c3 2 b c3 4 2
> 3.c3 3 c c3 5 3
> 4.c3 4 d c3 6 4
> 5.c3 5 e c3 7 5
> 1.c4 1 a c4 4 1
> 2.c4 2 b c4 5 2
> 3.c4 3 c c4 6 3
>
mylist[[i]]<-df[c("a","b",myname)]
names(mylist[[i]])<-c("a","b","c")
}
out<-do.call(rbind,mylist)
out
Thank you!
--
Dimitri Liakhovitski
__
R-help@r-project.org mailing list
https://stat.ethz.c
1 - 100 of 633 matches
Mail list logo