Displaying 20 results from an estimated 4000 matches similar to: "Documenting variables, dataframes and files?"
2011 Aug 22
1
Using the ConText editor?
In my orgainzation, the people resonsible for the network are not that keen on setting up new software, so when I asked them to set up emacs or some other common R editor, I was told to have a look at ConText. This editor is avaliable in the network, and there is some R support. Special commands are highlighted and such, but the most important part, sending commands writtten in a ConText window
2012 Nov 26
1
A problem subsetting a data frame
Hi all,
I have this microarray large microarray data set (ALL) from which I would like to subset or extract a set of data based on a factor ($mol.biol). I looked up some example of subsetting in, picked up two commands and tried both but I got error messages as follows
> testset <- subset(ALL, ALL$mol.biol %in% c("BCR/ABL","ALL1/AF4"))
>> Error in
2008 Feb 27
2
problem with creation of eSet
Hi,
I am having troubles with creating an eSet and would appreciate any help on
the following problem.
I am trying to create an eSet using the following code
pd <- read.table(file="pdata.txt",header =TRUE,row.names=1);
colnames(pd) <- c("type","tumor","time","id");
pdN <- list(type =
2018 Nov 10
2
Asignar distancias
Utilizo la función merge desde hace poco, pero no se me ocurre cómo
utilizarla para esto. Yo pienso que se puede hacer con una combinación
de ifelse-s pero no sé cómo. Seguro que hay más de una forma ce hacerlo.
Quoting José María Mateos <chema en rinzewind.org>:
> On Sat, Nov 10, 2018 at 07:54:19PM +0100, Manuel Mendoza wrote:
>> Muy buenas. A ver si alguien puede echarme
2018 Nov 10
2
Asignar distancias
Muy buenas. A ver si alguien puede echarme una mano.
A partir de una matriz de distancias de 29 x 29 he obtenido una df1.
Ahora tengo 841 filas con la distancia de cada combinación de esas 29
categorías.
Algo así como:
Var1 Var2 Dist
a a 0
a b 3
a c 5
b a 3
b b 0
b c 5
c ...
En otra df2, de 14563 filas, tengo las
2010 May 27
2
Methods to explore R data structures
Hi,
I'm very confused about R structures and the methods to go with them. I'm
using R for microarray analysis with Bioconductors. Suppose without reading
the documentations, what's the best way to explore a data structure when you
know nothing about it?
I am currently using is() / class() to see what the object is. str() /
attributes() to probe inside the object, and
2013 Feb 26
2
merging or joining 2 dataframes: merge, rbind.fill, etc.?
#I want to "merge" or "join" 2 dataframes (df1 & df2) into a 3rd
(mydf). I want the 3rd dataframe to contain 1 row for each row in df1
& df2, and all the columns in both df1 & df2. The solution should
"work" even if the 2 dataframes are identical, and even if the 2
dataframes do not have the same column names. The rbind.fill function
seems to work. For
2012 Jun 28
1
Merging listed dataset into one
Hello,
I'm wondering how I can merge two featuresets into one.
My dataset is two sets of microarray data and it looks like followings:
> rawData
$v1
TilingFeatureSet (storageMode: lockedEnvironment)
assayData: 2197815 features, 59 samples
element names: channel1, channel2
protocolData
rowNames: LT290677RU_D1_2011-02-16 LT286300LU_D1_2010-07-24 ...
LT003990RU_D1_2010-11-04 (59
2010 Dec 16
2
Compare two dataframes
Hello,
I have two dataframes DF1 and DF2 that should be identical but are not
(DF1 has some rows that aren't in DF2, and vice versa). I would like
to produce a new dataframe DF3 containing rows in DF1 that aren't in
DF2 (and similarly DF4 would contain rows in DF2 that aren't in DF1).
I have a solution for this problem (see self contained example below)
but it's awkward and
2009 Jan 21
3
merging several dataframes from a list
Hi there,
I have a list of dataframes (generated by reading multiple files) and all
dataframes are comparable in dimension and column names. They also have a
common column, which, I'd like to use for merging. To give a simple example of
what I have:
df1 <- data.frame(c(LETTERS[1:5]), c(2,6,3,1,9))
names(df1) <- c("pos", "data")
df3 <- df2 <- df1
df2$data
2007 Aug 03
4
FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame)
Hi all,
What are current methods people use in R to identify
mis-spelled column names when selecting columns
from a data frame?
Alice Johnson recently tackled this issue
(see [BioC] posting below).
Due to a mis-spelled column name ("FileName"
instead of "Filename") which produced no warning,
Alice spent a fair amount of time tracking down
this bug. With my fumbling fingers
2018 Dec 12
2
Subset dentro de un for
Gracias a los tres, Raúl, Marcelino y Carlos.
Lo del "get" de Marcelino me da la respuesta a lo que yo exactamente
preguntaba, y funciona, pero ahora tengo problemas con el for, por lo
que probablemente recurra al eval parse de Raúl o Carlos, que ya
tienen el for. Aún así, lo intento 1º con el get.
Con subset(df, subset=get(GT[i])>0) el problema es que en el for hago
un
2006 Jan 11
3
dataframes with only one variable
Subsetting from a dataframe with only one variable
returns a vector, not a dataframe.
This seems somewhat inconsistent.
Wouldn't it be better if subsetting would respect
the structure completely?
v1<-1:4
v2<-4:1
df1<-data.frame(v1)
df2<-data.frame(v1,v2)
sel1<-c(TRUE,TRUE,TRUE,TRUE)
> df1[sel1,]
[1] 1 2 3 4
> df2[sel1,]
v1 v2
1 1 4
2 2 3
3 3 2
4 4 1
--
Erich
2009 Oct 07
1
merging dataframes with an unequal number of variables
Hallo Everyone
I have the kind of problem that one should never have because one must
always plan well and communicate with your team. But now I haven't so here
is my problem.
I have data coming in on a daily basis from surveys in 10 towns. The
questionnaire has 62 variables but some of the regions have used older
versions of the questionnaire that have a few variables less. I want to
combine
2007 Oct 22
3
median value dataframe coming from multiple dataframes
Hi all,
I am not a skillful R programmer and has I am handling with large dataframes (about 30000 x 300) I am in need of an efficient function.
I have 4 dataframes with the same dimension. I need to generate other dataframe with the some dimension than the others where in each position it has the median value of the 4 values in the same position coming from the 4 dataframes.
Grateful by your
2009 Apr 09
2
failed when merging two dataframes, why
Hi, R-listers,
Failed, when I tried to merge df1 and df2 by "codetot" in df1 and "codetoto"
in df2. I want to know the reason and how to merge them together. Data
frames and codes I have used were listed as followed. Thanks a lot in
advance.
df1:
popcode codetot p3need
BCPy01-01 BCPy01-01-1 100.0000
BCPy01-01 BCPy01-01-2 100.0000
BCPy01-01 BCPy01-01-3 100.0000
BCPy01-02
2008 Aug 11
1
Unwanted carriage returns storing dataframes with dbWriteTable
If I save a dataframe with a character-typed last column to a relational
database with dbWriteTable, the values in the last column of the
resulting table in the database will have a '\r' (carriage return)
appended. If I read back the dataframe with dbReadTable the last column
in the resulting dataframe has also '\r' appended (see protocol below).
Setting or unsetting sql-mode
2013 Jan 11
2
Merging list of dataframes with reshape merge_all
Hi,
I'd like to merge mutliple dataframes from a list of dataframes by some common
columns. The approach for simply merging 2 dataframes is working with:
merge(df1,df2,by=c("col1","col2","col3"),all=TRUE)
For mutliple dataframes in a list I try to use the merge_all command
from the package reshape.
The documentation states that the command takes a list of
2011 Aug 29
2
splitting into multiple dataframes and then create a loop to work
Dear All
Sorry for this simple question, I could not solve it by spending days.
My data looks like this:
# data
set.seed(1234)
clvar <- c( rep(1, 10), rep(2, 10), rep(3, 10), rep(4, 10)) # I have 100
level for this factor var;
yvar <- rnorm(40, 10,6);
var1 <- rnorm(40, 10,4); var2 <- rnorm(40, 10,4); var3 <- rnorm(40, 5, 2);
var4 <- rnorm(40, 10, 3); var5 <- rnorm(40, 15,
2018 Dec 12
2
Subset dentro de un for
Gracias Marcelino. Si, (i in 1:length(GT)), lo he utilizado mil veces,
pero se me sigue olvidando de una vez a otra. Lo iba a mirar, pero me
centré primero en que me hiciera bien el mapa.
He probado el for y me da este error:
Error in aes(x = lon, y = lat, color = get(GT[i]), size = 2) +
scale_colour_gradient(low = ("white"), :
non-numeric argument to binary operator