I'd like to be able to access the windows clipboard from R under Cygwin.
But...
> read.table(file="clipboard")
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") : unable to contact X11 display
>
Is this supported in any way? Thanks
-Ed
id L Carlson
> Department of Anthropology
> Texas A&M University
> College Station, TX 77843-4352
>
> -Original Message-
> From: R-help On Behalf Of Ed Siefker
> Sent: Wednesday, February 27, 2019 5:03 PM
> To: r-help
> Subject: [R] inverse of which()
>
Given a vector of booleans, chich() will return indices that are TRUE.
Given a vector of indices, how can I get a vector of booleans?
My intent is to do logical operations on the output of grep(). Maybe
there's a better way to do this?
Thanks
-Ed
__
I have two chromatograms I want plotted on the same axes.
I would like the plots to be transparent, so the first chart is
not obscured.
I have tried adjustcolor(..., alpha.f=0.3), the problem is that
my chromatogram is so dense with datapoints that they
overlap and the entire graph just ends up a
I have dose response data analyzed with the package 'drc'.
'summary(mymodel)' prints my kinetic parameters. I want
that text in an ASCII text file. I want to get exactly what I
would get if I copied and pasted from the terminal window.
I've read the documentation on data export to text files her
I have dose response data I have analyzed with the 'drc' package.
Using plot() works great. I want to arrange my plots and source
data on a single page. I think 'gridExtra' is the usual package for
this.
I could use plot() and par(mfrow=...), but then I can't put the source
data table on the pag
2017 at 11:54 AM, David Winsemius wrote:
>
>> On Nov 2, 2017, at 9:27 AM, Ed Siefker wrote:
>>
>> I have a function:
>>
>> myplot <- function (X) {
>>d <- plotCounts(dds2, gene=X, intgroup="condition", returnData=TRUE)
>>png(pas
I have a function:
myplot <- function (X) {
d <- plotCounts(dds2, gene=X, intgroup="condition", returnData=TRUE)
png(paste("img/", X, ".png", sep=""))
ggplot(d, aes(x=condition, y=count, color=condition)) +
geom_point(position=position_jitter(w=0.1,h=0)) +
scale_y_log10
I have a google spreadsheet with a column of hyperlinks I want the URL from.
The googlesheets package can return this information with gs_read_cellfeed(),
but it needs to be reshaped with gs_reshape_cellfeed(). Problem is,
gs_reshape_cellfeed() returns the 'value' of the cells, not the
'input_valu
; "geno"
Really, really confused.
On Tue, Oct 24, 2017 at 12:58 PM, Ed Siefker wrote:
> Why doesn't this work?
>
>> samples$geno <- as.data.frame(sapply(yo, toupper), col.names="geno")
>> samples
> quan
Why doesn't this work?
> samples$geno <- as.data.frame(sapply(yo, toupper), col.names="geno")
> samples
quant_samples age sapply(yo, toupper)
E11.5 F20het BA40 E11.5 F20het BA40 E11.5 F20HET
E11.5 F20het BA45 E11.5 F20het BA45 E11.5 F20
I have a list of file names, and a list of data frames contained in those files.
mynames <- list.files()
mydata <- lapply(mynames, read.delim)
Every file contains two columns.
> colnames(mydata[[1]])
[1] "Name" "NumReads"
> colnames(mydata[[2]])
[1] "Name" "NumReads"
I can set the colna
I have a data frame full of integer values. I need a matrix full of
numeric values.
?data.matrix reads:
Return the matrix obtained by converting all the variables in a
data frame to numeric mode and then binding them together as the
columns of a matrix.
This does not work.
test.
..@r-project.org] On Behalf Of Ista Zahn
> Sent: Thursday, September 28, 2017 12:27 PM
> To: Ed Siefker
> Cc: r-help
> Subject: Re: [R] Boxplot, formula interface, and labels.
>
> mybp <- boxplot(count ~ geno * tissue, data = mydata, plot = FALSE)
> mybp$names <- gsub
t()?
On Thu, Sep 28, 2017 at 11:40 AM, Ed Siefker wrote:
> I have data I'd like to plot using the formula interface to boxplot.
> I call boxplot like so:
>
> with(mydata, boxplot(count ~ geno * tissue))
>
> I get a boxplot with x axis labels like "wt.kidney". I w
I have data I'd like to plot using the formula interface to boxplot.
I call boxplot like so:
with(mydata, boxplot(count ~ geno * tissue))
I get a boxplot with x axis labels like "wt.kidney". I would like
to change the '.' to a newline. Where is this separator configured?
Thanks,
-Ed
_
I have a data set with observations on groups with multiple variables.
Let's call them GENO and AGE. I have control and test genotypes
and two different ages. It is only meaningful to compare control and
test within the same age.
I'd like to get the p value for each group compared back to contro
package to bind all the data.frames together
> (a regular loop will also work). Afterwards you can summarise using ddply
>
> Hope this helps
> Ulrik
>
>
> Ed Siefker schrieb am Fr., 3. Juni 2016 21:10:
>>
>> aggregate isn't really what I want. Maybe tapply? I
ata type. What function will
do the same on lists? lapply doesn't have a 'by' argument.
On Fri, Jun 3, 2016 at 1:41 PM, Ed Siefker wrote:
> I manually constructed the list of sample names and tried the
> aggregate call I mentioned.
> Merge works when called manually, b
ame red green
1 sample2 1030
> aggregate(mylist, by=as.list(names), merge)
Error in as.data.frame(y) : argument "y" is missing, with no default
What's the right way to do this?
On Fri, Jun 3, 2016 at 1:20 PM, Ed Siefker wrote:
> I have a list of data as follo
I have a list of data as follows.
> list(data.frame(name="sample1", red=20), data.frame(name="sample1",
> green=15), data.frame(name="sample2", red=10), data.frame(name="sample 2",
> green=30))
[[1]]
name red
1 sample1 20
[[2]]
name green
1 sample115
[[3]]
name red
1 sample
I have many data files named like this:
E11.5-021415-dko-1-1-masked-bottom-area.tsv
E11.5-021415-dko-1-1-masked-top-area.tsv
E11.5-021415-dko-1-2-masked-bottom-area.tsv
E11.5-021415-dko-1-2-masked-top-area.tsv
E11.5-021415-dko-1-3-masked-bottom-area.tsv
E11.5-021415-dko-1-3-masked-top-area.tsv
ag
I'm doing some string manipulation on a vector of file names, and noticed
something curious. When I strsplit the vector, I get a list of
character vectors.
The list is numbered, as lists are. When I cast that list as a data
frame with 'as.data.frame()', the resulting columns have names derived
fr
So that's how that works! Thanks.
On Fri, Jan 22, 2016 at 1:32 PM, Joe Ceradini wrote:
> Does this do what you want?
>
> aggregate(Nuclei ~ Slide, example, sum)
>
> On Fri, Jan 22, 2016 at 12:20 PM, Ed Siefker wrote:
>>
>> Aggregate does the right thing w
Aggregate does the right thing with column names when passing it
numerical coordinates.
Given a dataframe like this:
Nuclei Positive Nuclei Slide
1133 96A1
2 96 70A1
3 62 52A2
4 60 50A2
I can call 'aggregate' li
I'm trying to plot() over an existing plot() like this:
> attach(mtcars)
> plot(mpg, hp)
> par(new=TRUE)
> par("usr")
[1] 9.46 34.84 40.68 346.32
> plot(mpg, hp, col="red", axes=FALSE, xlim=par("usr")[1:2],
> ylim=par("usr")[3:4], xlab="", ylab="")
> par("usr")
[1] 8.4448 35.8552 28.4544
I'm used to using ctrl-c to end operations without killing R. But I've used
xlsx in this session, which loads Java, which apparently intercepts the
ctrl-C. Accordingly, I hit ctrl-C, R died, and I lost a lot of work.
I did some looking, and found a
thread(http://comments.gmane.org/gmane.comp.lan
I have a table, and I want a new column to add some annotations to.
But it ends up as a factor instead of characters, and won't let me add
arbitrary text.
> data(iris)
> iris<-data.frame(iris,annot=c(""))
> iris[1,"annot"]<-"annotation"
Warning message:
In `[<-.factor`(`*tmp*`, iseq, value = "anno
--
> David L Carlson
> Associate Professor of Anthropology
> Texas A&M University
> College Station, TX 77843-4352
>
>
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
>> project.org] On Behalf Of Ed Sief
I'm trying to read in a tab separated table with read.delim().
I don't particularly care what the row names are.
My data file looks like this:
start stopSymbol Insert sequence Clone End Pair FISH
203048 67173930ABC8-43024000D23TI:993812543
TI:993834585
255176 87
lapply -- paste is
> vectorized so this
>
> paste("filename_", suff, ".ext", sep = "")
>
> will work. But if you want to use lapply (for whatever reason) try this:
>
> lapply(suff, function(x) paste("filename_", x, ".ext", sep = &q
I have a list of suffixes I want to turn into file names with extensions.
suff<- c("C1", "C2", "C3")
paste("filename_", suff[[1]], ".ext", sep="")
[1] "filename_C1.ext"
How do I use lapply() on that call to paste()?
What's the right way to do this:
filenames <- lapply(suff, paste, ...)
?
Can
I have data that looks like this:
> df1
group id
1 red A
2 red B
3 red C
4 blue D
5 blue E
6 blue F
I want a list of the groups containing vectors with the ids.I am
avoiding subset(), as it is
only recommended for interactive use. Here's what I have so far:
df1 <- data.fra
Thanks, deparse(substitute()) does exactly what I want.
On Sat, Mar 24, 2012 at 4:20 PM, R. Michael Weylandt
wrote:
> Can you be a little more concrete?
>
> If you want the form of the expression given (rather than its value),
> deparse(substitute()) will work:
>
> fnc1 <- function(x){ deparse(su
Is there a way I can get the names of the arguments passed to a
function from within a function?
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.htm
I would like to subset by dataframe by matching all rows that have any value
from a list of values. I can get it to work if I have exactly one value,
I'm not
sure how to do it with a list of values though.
This works and gives me exactly one line:
my.df[ which( mydf$IDX==17)), ]
I would like to
Is there a simple way to use Rserve/RSclient as a proxy to transparently
send requests from a local instance of R to a remote instance? It seems
like this would by doable by wrapping each call that doesn't refer to a
local path inside RSeval. Is this harder than it seems? Does this already
exis
I am trying to use the coXpress function from
the coXpress package. This function requires
numerical vectors indicating which columns
are in which group.
The problem is, I can only figure out how
to get a logical structure, not a numerical one.
In other words, coXpress wants something like:
"1:3"
38 matches
Mail list logo