Displaying 20 results from an estimated 400 matches similar to: "FW: Index out SNP position"
2013 Jan 03
4
Index out SNP position
Dear R experts,
I have 2 matix: A& B. I am trying to index B against A - (1) find out B rows that fall between the col 1 and 2 of A& put them into a new vector SNP.I made code as below, but I cannot think of a right way to do it. Could anyone help me with the code? Thanks,Jiang----
A <-
2012 Sep 26
3
replace string values with numbers
Hi everyone, I have a data frame Gene with SNPs eg. P1 P2 P3
CG CG GG
-- -- AC
-- AC CC
AC -- AC I tried to replace all the GG with a value 3. Gene[Gene=="GG"]<-3 It always give me: Warning in `[<-.factor`(`*tmp*`, thisvar, value = 3) :
invalid factor level, NAs generated Does any know if there is anything wrong with my code? Thanks, Zhengyu
2013 Feb 21
3
Ask for help: find corresponding elements between matrix
Dear R experts,
I have two matrix (seq & mat) & I want to retrieve in a new matrix all the numbers from mat that =1 (corresponding to the same row/ column position) in seq, or all the numbers in mat that =-1 in seq. - Replace all the numbers with NA if it's not 1/-1 in seq. There are some "NA"s in seq.
seq=matrix(c(1,-1,0,1,1,-1,0,0,-1,1,1,NA),3,4)
2018 Jun 01
0
Regroup and create new dataframe
No html!, Copy the list using Reply-All.
The data frame group_PrivateLabel does not contain variables called Product_Name or Region.
David C
From: nguy2952 University of Minnesota <nguy2952 at umn.edu>
Sent: Friday, June 1, 2018 2:13 PM
To: David L Carlson <dcarlson at tamu.edu>
Subject: Re: [R] Regroup and create new dataframe
Hi David,
your example is perfect!
I am still
2018 Jun 01
0
Regroup and create new dataframe
Responses should be copied to r-help using ReplyAll. You are still sending html formatted emails. If you are using Microsoft Outlook, click the Format Text tab and select ?Aa Plain Text?. No one has asked you to reveal the data set, only to create one with a similar structure. Is the data I sent reasonably close? What should it look like after it is transformed?
David C
From: nguy2952
2017 Jun 01
1
Reversing one dimension of an array, in a generalized case
Thanks again. I am going to try the different versions. But I probably won't be able to get to it till next week.
This is probably at the point where anything further should be sent to me privately.
-Roy
> On Jun 1, 2017, at 1:56 PM, David L Carlson <dcarlson at tamu.edu> wrote:
>
> On the off chance that anyone is still interested, here is the corrected function using
2018 Apr 18
0
nMDS with R: missing values
I'm not sure how you are incorporating time period into your data structure. Typically we are looking at plots or assemblages as the rows and taxa as the columns. Time period adds a third dimension that could be added as blocks of rows. For example, depending on the resolution of your data, one approach would be to have up to 8 rows for each locality: Loc1.1000, Loc1.2000, . . . Loc1.8000. If
2017 Jun 01
0
Reversing one dimension of an array, in a generalized case
On the off chance that anyone is still interested, here is the corrected function using aperm():
z <- array(1:120,dim=2:5)
f2 <- function(a, wh) {
idx <- seq_len(length(dim(a)))
dims <- setdiff(idx, wh)
idx <- append(idx[-1], idx[1], wh-1)
aperm(apply(a, dims, rev), idx)
}
all.equal(f(z, 1), f2(z, 1))
# [1] TRUE
all.equal(f(z, 2), f2(z, 2))
# [1] TRUE
2017 Jul 19
0
Redundancy canonical analysis plot problem in 3D using VEGAN, RGL, SCATTERPLOT3D and SFSMISC
We need to keep the discussion on the list. When I run your code, there are several problems.
strain.data <- read.xlsx("Dee rhiz.xlsx", sheetName ="strain", header = T, row.names = 1)
str(strain.data) # lists 9 columns at the end with all NAs
strain.data1 <- (strain.data, sqrt.dist = TRUE) # this is not a valid R line. I get
Error: unexpected ',' in
2017 Jun 01
0
Reversing one dimension of an array, in a generalized case
Thanks to all for responses/. There was a question of exactly what was wanted. It is the generalization of the obvious example I gave,
>>> junk1 <- junk[, rev(seq_len(10), ]
so that
junk[1,1,1 ] = junk1[1,10,1]
junk[1,2,1] = junk1[1,9,1]
etc.
The genesis of this is the program is downloading data from a variety of sources on (time, altitude, lat, lon) coordinates, but all
2012 Oct 02
5
smoothScatter plot
Hi, I want to make a plot similar to sm1 (attached). The code I tried is: dcols <- densCols(x,y)
smoothScatter(x,y, col = dcols, pch=20,xlab="A",ylab="B")
abline(h=0, col="red")
But it turned out to be s1 (attached) with big dots. I was wondering if anything wrong with my code. Thanks,Zhengyu
-------------- next part --------------
A non-text
2018 May 10
1
BoxPlot Adding Mean and Median Values
Hello Dave
Here is the code I have tried.
getwd()
setwd("D:/BAP Session/Nuance")
getwd()
AmbientTr <- read.csv("AmbientBatchbox.csv", stringsAsFactors = TRUE)
str(AmbientTr)
summary(AmbientTr)
install.packages("ggplot2")
library(ggplot2)
boxplot(RTF~Batch,data=AmbientTr, ylim = c(0,30), main="RTF By Batch",
xlab="Batch",
2017 Oct 25
0
as.data.frame doesn't set col.names
> On 24 Oct 2017, at 22:45 , David L Carlson <dcarlson at tamu.edu> wrote:
>
> You left out all the most important bits of information. What is yo? Are you trying to assign a data frame to a single column in another data frame? Printing head(samples) tells us nothing about what data types you have, especially if the things that look like text are really factors that were created
2017 Oct 25
1
as.data.frame doesn't set col.names
Hi Peter,
Thanks for contributing such a great answer. Can you please provide a
pointer to the documentation where it explains why dd$B <- s and dd["B"] <-
s have such different behavior?
(I am perfectly happy if you write the explanation but if it saves you time
to point to some reference that works fine for me.)
Regards,
Eric
On Wed, Oct 25, 2017 at 2:27 PM, Peter Dalgaard
2016 Apr 29
0
clock24.plot/radial plot: Fixed
Dear All,
This problem is over. Clock24.plot did the job. Thanks to all those who
assisted me.
Ogbos
On Apr 22, 2016 8:34 PM, "Ogbos Okike" <giftedlife2014 at gmail.com> wrote:
> Dear All,
> One hand. Many thanks!! The code run as soon as I loaded lubridate.
>
> Please can you guide me on how to relate this code to my actual data.
> My actual data is looking like:
2017 Nov 01
0
Function to save results
No. You have not used it correctly. It was an example. Put your commands between the two sink functions. That will save any printed out put that results from those commands. It will not save attr, but you did not ask how to do that.
David C
On Nov 1, 2017 12:21 PM, Priya Arasu <galaxie2485 at yahoo.co.in> wrote:
Hi David,
Thank you for the example.
When I try to use the cat function, I get
2011 Dec 13
0
snpStats imputed SNP probabilities
Hi,
Does anybody know how to obtain the imputed SNP genotype probabilities from the snpStats package?
I am interested in using an imputation method implemented in R to be further used in a simulation study context.
I have found the snpStats package that seems to contain suitable functions to do so.
As far as I could find out from the package vignette examples and its help, it gives the
2011 Sep 26
1
Packages for snp, CNV data
Hi,
In addition to GADA, what are the available package in R and bioconductor to analyze amplification, deletion, LOH and indels of CNV, SNP data? Any reference is welcome.
Best,
Carol
2007 May 25
1
Read in 250K snp chips
I'm having trouble getting summaries out of the 250K snp chips in R. I'm
using the oligo package and when I attempt to create the necessary SnpQSet
object (to get genotype calls and intensities) using snprma, I encounter
memory issues.
Anyone have an alternative package or workaround for these large snp chips?
--
View this message in context:
2007 Oct 30
0
Plotting question: how to plot SNP location data?
Hello,
I would like to plot specific SNPs with their exact locations on a
chromosome. Based on my genotyping results I would like to separate
these SNPs in three different categories: 1, 2 and 3 and use different
colours to represent these categories. The script below generates the
sample data. I can plot these with the image function using the
following:
val <- 1:3
samp <- sample(val,