Try:
If dat is the dataset.
library(stringr)
res <- str_extract(dat$Gene.Symbol, perl('[[:alnum:]]+(?= \\/)'))
res[!is.na(res)]
#[1] "CDH23"
A.K.
On Thursday, July 31, 2014 9:54 PM, Stephen HK Wong wrote:
Dear All,
I appreciate if you can help me out this. I have a data frame cont
Hi Anna
I forgot you had problems with lty
I have cleaned up the yright and put lty in
yright <-
xyplot(mavg ~ Year, mydata, groups = Type,
type = "l",
ylab = "mean",
lty = 1:3,
par.settings = list(layout.heights = list(key.top = 1.5)), #
separate key from botto
Hello,
I would like to provide a helpful bug report to the maintainer of Rmixmod, but
I'm not skilled in memory profiling.
The following example illustrates the problem :
library(Rmixmod)
genes <- matrix(rnorm(5000*50, 9, 2), nrow = 5000, ncol = 50)
selected <- sample(5000, 25)
columns <- split
The script below generates two side by side 3D histograms (OS - Windows,
RStudio v 98.507).
I'm trying to avoid using a TIFF file editor to cleanup the figure, and
would like to create fully reproducible
output using R script. Help would be appreciated to:
-reverse the direction of the arrow
Hi Anna
I have gone back to doubleYScale because I started following the wrong
section that I had before so it was quicker to do doubleYScale
You need to have 2 lattice objects and components are taken from each below
so use the function str on the three objects to see
library(lattice)
library(l
Dear All,
I appreciate if you can help me out this. I have a data frame contains many
thousand of rows, with some rows that has /// symbol, as shown in in row 2, I
want to extract word before ///, such as in this case, CDH23. Many thanks.
Probe.Set.IDGene.Symbol
1 1552301_a_at
On 7/31/2014 1:16 PM, Christofer Bogaso wrote:
Hi again,
I am trying to create a animation with Animation package. I preferred
to create animation with HTML file than through GIF because this
requires additional installation of ImageMagick which is not possible
with my system.
So I just run fol
I am trying to configure Rserve for use with Tableau on a Windows Server 2012,
however no remote telnet commands are successful on port 6311.
Is there any link or guide you can recommend on configuring this package on a
windows environment?
Thanks!
Javier Guillen
[[alternative HTML v
Hi again,
I am trying to create a animation with Animation package. I preferred
to create animation with HTML file than through GIF because this
requires additional installation of ImageMagick which is not possible
with my system.
So I just run following code available in help page:
saveHTML({
Thanks Ista,
I will try your procedure next Tuesday. This is going pretty slow because I
only work at that machine Tuesday-Thursday.
I will let you know how it goes (lucky you!) by private email as I don't think
there is any use in bothering all of r-help.
After trying your suggestions next wee
Even better is to replace
for(i in 1:length(something)) {}
with
for(i in seq_along(something)) {}
The former gives you 2 iterations, the 2nd probably causing an error,
when length(something) is 0. The latter always gives one iteration
per element of 'something'.
Bill Dunlap
TIBCO Softwar
The range vector is evaluated at the start of the loop, so it is only evaluated
once. ind.length would be an unnecessary extra variable.
---
Jeff NewmillerThe . . Go Live...
DCN:
Hi Keith,
So the plot thickens. How is it that you have R 3.1.1 but apt-get
install rJava gives you an old version of the package? This may be
potentially difficult to figure out, but you can try some easy things
first. If I were you I would start with
sudo apt-get remove r-base r-devel
sudo apt-
While youre at it, assign length(ind) to a variable before starting the loop.
Otherwise length() is called at each iteration. e.g.,
ind.length <- length(ind)
for (i in 1:ind.length) {
etc.
On Jul 31, 2014, at 10:57 AM, David L Carlson wrote:
> This is one of those times when you would do b
The brushing may only be available in the development version of
ggvis. See here for the example:
https://github.com/rstudio/webinars/tree/master/2014-01
On Thu, Jul 31, 2014 at 10:17 AM, Shi, Tao wrote:
> I looked at ggvis briefly before, but didn't notice its brushing capability.
> Now you
I looked at ggvis briefly before, but didn't notice its brushing capability.
Now you explained.
Thanks, both!
Tao
On Wednesday, July 30, 2014 9:50 AM, Ramnath Vaidyanathan
wrote:
ggvis is an excellent option to do this kind of stuff.
The only limitation currently is that all sorts of
Did you ever manage to solve this problem, Jamie?
Ben
On Friday, 2 May 2014 19:50:27 UTC+1, Jamie Olson wrote:
>
> I would like to encode/decode some text with deflate/gzip, but I'm
> having trouble.
>
> Decoding values from a rawConnection is fairly straightforward, but
> I'm having trouble e
This is one of those times when you would do better to just use a loop. It will
be easier to debug and to see what is going on. Replace the sapply() call with
for (i in 1:length(ind)) {
postscript(names(ind[i]))
par(mar=c(6,8,6,5), cex=0.8)
plot(ind[[i]][,c('YEAR','VA
Great.
I also said "I see the point of keeping prompts", and that is why the
chunk option prompt=TRUE is provided in knitr. I may not agree with
your preference, but that does not mean I should stop you completely
from having your own preference.
Regards,
Yihui
--
Yihui Xie
Web: http://yihui.nam
On Jul 31, 2014, at 9:26 AM, Luis Borda de Agua wrote:
> I’m using R 3.1.0 in OS X 10.9.4 (Mavericks)
>
> I’m running a function Y that calls a function X which occasionally generates
> a warning.
> Say that I call the function X 1000 times, and out of these 1000 times I get
> the following m
I’m using R 3.1.0 in OS X 10.9.4 (Mavericks)
I’m running a function Y that calls a function X which occasionally generates a
warning.
Say that I call the function X 1000 times, and out of these 1000 times I get
the following message:
"There were 36 warnings (use warnings() to see them)"
How c
If you are new, one of the best ways to learn and then start contributing is to
just read the R-help list a lot. Even if you don't think that you can answer a
specific question you see a lot and you can try to anwser questions even if you
don't post a solution.
Welcome to R.
John Kane
Kingsto
>
> R> as.vector(sapply(my.cache.list, function(x)strsplit(x, "\\.")[[1]][2]))
> [1] "subject_test" "subject_train" "y_test""y_train"
>
>
> R> gsub("df\\.(.*)\\.RData", "\\1", my.cache.list)
> [1] "subject_test" "subject_train" "y_test""y_train"
>
>
> Note that "." will match any
Have a look at http://www.r-bloggers.com/getting-tables-from-r-output/ for a
suggestion. using raw xtable output You end up having to format the table in a
word processor or spreadsheet, but it seems to work. I keep forgetting just
how ugly html tables can be.
John Kane
Kingston ON Canada
>
Hi,
Here are two possibilities:
R> as.vector(sapply(my.cache.list, function(x)strsplit(x, "\\.")[[1]][2]))
[1] "subject_test" "subject_train" "y_test""y_train"
R> gsub("df\\.(.*)\\.RData", "\\1", my.cache.list)
[1] "subject_test" "subject_train" "y_test""y_train"
Note that "
Try:
gsub(".*\\.(.*)\\..*","\\1", my.cache.list)
[1] "subject_test" "subject_train" "y_test" "y_train"
#or
library(stringr)
str_extract(my.cache.list, perl('(?<=\\.).*(?=\\.)'))
[1] "subject_test" "subject_train" "y_test" "y_train"
A.K.
On Thursday, July 31, 2014 11:05 AM,
> I want to keep only the part inside the two points. After lots of headache
> using grep() when trying something like this:
>
> grep('.(.*?).','df.subject_test.RData',value=T)
>
>
> Does anyone have any suggestion ?
gsub("df\\.(.+)\\.RData", "\\1", 'df.subject_test.RData')
Steve E
***
On Jul 31, 2014, at 4:49 AM, John McKown wrote:
> OK, I'm probably using the wrong tool for this, but I'm doing
> everything else in this project in R, so I'm looking at how to do this
> too. I create a number of graphs using ggplot2. I use the png()
> function before the print(..graph.variable..
Hi,
I'm relatively new to R and I would like to do the following:
I have a .csv file with four columns (NAME, ID, YEAR, VALUE) and would like
to do several xy plots with the year on the x-axis and the data values
(measurements) on the y-axis and after that export the different plots to
postcript.
A directory is full of data.frames cache files. All these files have
the same pattern:
df.some_name.RData
my.cache.list <- c("df.subject_test.RData", "df.subject_train.RData",
"df.y_test.RData",
"df.y_train.RData")
I want to keep only the part inside the two points. After lots of
headache using
Thanoon,
You should still send the question to the R help list even when I helped
you with the code you are currently using. I will not always know the best
way or even how to proceed with some questions. As for to your question
with the code below.
Firstly, there is no 'phi' method for cor in
On Thu, Jul 31, 2014 at 7:34 AM, Jody White wrote:
> What about xtable? If it's going to PowerPoint and you're using RStudio,
> what about using knitr and exporting to PowerPoint and use xtable?
>
I'll need to look at those. I'm new to R and am not familiar with
either of those two packages.
--
Ista Et Al,
Unfortunately your suggestion to use remove.packages did exactly the reverse of
what you thought would happen.
I have cleaned up my installation but still have trouble getting rJava to
install properly and of course that means that XLConnect cannot install either.
--
On Jul 31, 2014, at 3:17 AM, Uwe Ligges wrote:
>
>
> On 31.07.2014 04:46, carol white wrote:
>> There are some level of variation either chars followed by numbers or chars,
>> numbers, chars
>>
>>
>> Perhaps, I should use gsub as you suggested all and if the string is
>> composed of chars
On 31/07/2014, 8:06 AM, Duncan Murdoch wrote:
> On 31/07/2014, 7:49 AM, John McKown wrote:
>> OK, I'm probably using the wrong tool for this, but I'm doing
>> everything else in this project in R, so I'm looking at how to do this
>> too. I create a number of graphs using ggplot2. I use the png()
>>
On Thu, 31 Jul 2014 06:49:22 AM John McKown wrote:
> OK, I'm probably using the wrong tool for this, but I'm doing
> everything else in this project in R, so I'm looking at how to do this
> too. I create a number of graphs using ggplot2. I use the png()
> function before the print(..graph.variable.
On 31/07/2014, 7:49 AM, John McKown wrote:
> OK, I'm probably using the wrong tool for this, but I'm doing
> everything else in this project in R, so I'm looking at how to do this
> too. I create a number of graphs using ggplot2. I use the png()
> function before the print(..graph.variable..) in or
OK, I'm probably using the wrong tool for this, but I'm doing
everything else in this project in R, so I'm looking at how to do this
too. I create a number of graphs using ggplot2. I use the png()
function before the print(..graph.variable..) in order to create a PNG
file which can be embedded in a
On 30/07/2014, 11:12 PM, Yihui Xie wrote:
> No. That is not my suggestion. Joshua Wiley correctly explained what I
> was suggesting. Prompts are useful in the R console, but not
> necessarily in a report.
Okay, then we agree. For Erin's purpose (teaching), it is helpful to
beginners if the docume
On Thu, Jul 31, 2014 at 4:28 AM, Rolf Turner wrote:
> On 31/07/14 12:06, Joshua Wiley wrote:
>
>
>
>
>> I don't think that this is about prompts in interactive R, but when a
>> document is knit, should the echoed code in the report have prompts or
>> not.
>
>
> Surely that should be left up to th
Hopefully, better late than never
Current version of Rattle (3.1.4) supports sub= in fancyRpartPlot() to
override or get rid of that "useless title", as in:
> fancyRpartPlot(m, sub="")
Install it using:
> install.packages("rattle", repos="http://rattle.togaware.com";,
type="source")
Graham
On 31/07/14 12:06, Joshua Wiley wrote:
I don't think that this is about prompts in interactive R, but when a
document is knit, should the echoed code in the report have prompts or not.
Surely that should be left up to the user. And as Erin pointed out in
her second message, it is. The def
On 31.07.2014 04:46, carol white wrote:
There are some level of variation either chars followed by numbers or chars,
numbers, chars
Perhaps, I should use gsub as you suggested all and if the string is composed
of chars followed by numbers, it will return the 3rd part empty?
Please read a
43 matches
Mail list logo