Displaying 20 results from an estimated 5000 matches similar to: "markdown's reference links with the implicit name syntax - improvement suggestion?!?"
2005 Aug 10
1
Why only a "" string for heading for row.names with write.csv with a matrix?
Consider:
> x <- matrix(1:6, 2,3)
> rownames(x) <- c("ID1", "ID2")
> colnames(x) <- c("Attr1", "Attr2", "Attr3")
> x
Attr1 Attr2 Attr3
ID1 1 3 5
ID2 2 4 6
> write.csv(x,file="x.csv")
"","Attr1","Attr2","Attr3"
"ID1",1,3,5
2008 Feb 13
3
Syntax for extensions
Hello,
I need to to slightly extend the markdown syntax. (place an image (img tag)
in text which URL has not yet been determined). Therefore I want to define
something like $[Alt text](img.jpg) which would be replaced by my
pre-processor with ![Alt text](/path/to/img.jpg) and then sent to markdown.
Is there any special syntax that should be used for such 3rd party extensions?
How would you do
2013 Apr 12
1
Removing rows that are duplicates but column values are in reversed order
Hi,
From your example data,
dat1<- read.table(text="
id1?? id2?? value
a????? b?????? 10
c????? d??????? 11
b???? a???????? 10
c????? e???????? 12
",sep="",header=TRUE,stringsAsFactors=FALSE)
#it is easier to get the output you wanted
dat1[!duplicated(dat1$value),]
#? id1 id2 value
#1?? a?? b??? 10
#2?? c?? d??? 11
#4?? c?? e??? 12
But, if you have cases like the one
2012 Apr 14
3
Choose between duplicated rows
Dear r experts,
Sorry for this basic question, but I can't seem to find a solution?
I have this data frame:
df <- data.frame(id = c("id1", "id1", "id1", "id2", "id2", "id2"), A =
c(11905, 11907, 11907, 11829, 11829, 11829), v1 = c(NA, 3, NA,1,2,NA), v2 =
c(NA,2,NA, 2, NA,NA), v3 = c(NA,1,NA,1,NA,NA), v4 = c("N",
2008 Jul 09
2
Parsing
Dear R users,
I have a big text file formatted like this:
x x_string
y y_string
id1 id1_string
id2 id2_string
z z_string
w w_string
stuff stuff stuff
stuff stuff stuff
stuff stuff stuff
//
x x_string1
y y_string1
z z_string1
w w_string1
stuff stuff stuff
stuff stuff stuff
stuff stuff stuff
//
x x_string2
y y_string2
id1
2010 Sep 07
1
average columns of data frame corresponding to replicates
Hi Group,
I have a data frame below. Within this data frame there are samples
(columns) that are measured more than once. Samples are indicated by
"idx". So "id1" is present in columns 1, 3, and 5. Not every id is
repeated. I would like to create a new data frame so that the repeated
ids are averaged. For example, in the new data frame, columns 1, 3,
and 5 of the original
2009 Dec 10
1
problem with data processing in R
Hi,
I'm stuck with parsing data into R for heatmap representation.
The data looks like:
1 id1 x1 x2 x3 .... x20
2 id1 x1 x2 x3 .... x20
3 id1 x1 x2 x3 .... x20
4 id1 x1 x2 x3 .... x20
.........
348 id2 x1 x2 x3 .... x20
349 id2 x1 x2 x3 .... x20
350 id2 x1 x2 x3 .... x20
351 id2 x1 x2 x3 .... x20
.........
The data is sorted for the IDs (id1,id2 .....id40) and I like to
2012 Feb 22
1
Lattice and horizontally stacked density plots
Hello,
I am try to make a density plot where plots are stacked like the one
found here:
http://dsarkar.fhcrc.org/lattice/book/images/Figure_14_03_stdBW.png
I am facing problems, however. Using the code example below, I'd like
to generate a separate panel for each val of id2. Within each panel,
I'd like to have individual histograms each on separate lines based on
the value of id1. ?Note
2011 Apr 20
1
How to check if a value of a variable is in a list
Hi all,
I am working with some social network analysis in R and ran into a problem I
just cannot solve.
Each observation in my data consists of a respondent, some characteristics
and up to five friends. The problem is that all of these five friends might
no show up later as a respondent (observation). Therefore I might not have
characteristics on all the friends listed in the data and I want to
2011 Apr 25
2
Problem with ddply in the plyr-package: surprising output of a date-column
Hi Together,
I have a problem with the plyr package - more precisely with the ddply
function - and would be very grateful for any help. I hope the example
here is precise enough for someone to identify the problem. Basically,
in this step I want to identify observations that are identical in
terms of certain identifiers (ID1, ID2, ID3) and just want to save
those observations (in this step,
2009 Sep 09
4
tables with Unicode box drawing characters?
Hello,
I read David Wheeler's table proposal[1] for Markdown and very much
agree with his conclusion and PostgreSQL-inspired proposed format. I
also read the mailing list archives for 2009 but did not find any
clear concesus on whether DW's format was officially accepted (I hope
it is soon!).
However, I want to ask: has anyone considered taking these simple
ASCII table drawings to the
2007 Apr 20
2
Fastest way to repeatedly subset a data frame?
Hi -
I have a data frame with a large number of observations (62,000 rows,
but only 2 columns - a character ID and a result list).
Sample:
> my.df <- data.frame(id=c("ID1", "ID2", "ID3"), result=1:3)
> my.df
id result
1 ID1 1
2 ID2 2
3 ID3 3
I have a list of ID vectors. This list will have anywhere from 100 to
1000 members, and
2008 Jan 10
1
data.frame manipulation: Unbinding strings in a row
Hi all,
I have a data.frame I received with data that look like this (comma
separated strings in last row):
ID Shop Items
ID1 A1 item1, item2, item3
ID2 A2 item4, item5
ID3 A1 item1, item3, item4
But I would like to unbind the strings in col(2) items so that it will look
like this:
ID Shop Items
ID1 A1 item1
ID1 A1 item2
ID1 A1 item3
ID2 A2 item4
ID2 A2 item5
ID3 A1 item1
ID3 A1 item3
ID3 A1
2006 Oct 17
0
[678] trunk/wxruby2/doc/textile/commandevent.txtl: Fixed a few event macros that did not get fixed by the parser.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2011 May 25
1
Subtracting rows by id
Dear R users,
I have two datasets:
id1 <- c(rep(1,10), rep(2,10), rep(3,10))
value1 <- sample(1:100, 30, replace=TRUE)
dataset1 <- cbind(id1,value1)
id2 <- c(1,2,3)
subtract.value <- c(1,3,5)
dataset2 <- cbind(id2, subtract.value)
I want to subtract the number of rows in the subtract.value that
corresponds to the id value in dataset1. So for the 1 in id1, I want
to
2012 Jan 27
1
multiple column comparison
Hello,
I have a very large content analysis project, which I've just begun to
collect training data on. I have three coders, who are entering data on up
to 95 measurements. Traditionally, I've used Excel to check coder agreement
(e.g., percentage agreement), by lining up each coder's measurements
side-by-side, creating a new column with the results using if statements.
That is, if
2006 Mar 05
2
Wishlist: merge and subset to keep attributes (PR#8658)
Full_Name: Ulrike Gr?mping
Version: 2.2.1
OS: Windows
Submission from: (NULL) (84.190.139.94)
When importing data from SPSS, it is a nice feature of the package foreign that
it allows (option use.value.labels=F) to work with the original SPSS codes while
keeping the value labels as information in an attribute. Unfortunately, after
merging or subsetting, these attributes disappear.
The code
2005 Nov 09
3
dataframe without repetition
Hello,
with a data.frame like this :
> toto <-
data.frame(id=c("id1","id1","id2","id3","id3","id3"),dpt=c("13","13","34","30","30","30"))
> toto
id dpt
1 id1 13
2 id1 13
3 id2 34
4 id3 30
5 id3 30
6 id3 30
what is the most efficient ways to obtain :
id
2008 Sep 25
2
How to order some of my columns (not rows) alphabetically
Hello,
I have a dataframe with 9 columns, and I would like to sort (order) the
right-most eight of them alphabetiaclly, i.e.:
ID1 ID2 F G A B C E D
would become
ID1 ID2 A B C D E F G
Right now, I'm using this code:
attach(data)
data<-data.frame(ID1,ID2,data[,sort(colnames(data)[3:9])])
detach(data)
but that's not very elegant. Ideally I could specify which columns to
sort and
2012 Feb 26
1
Matrix problem to extract animal associations
Dear List,
I have been trying to extract associations from a matrix whereby individual locations are within a certain distance threshold from one another.
I have been able to extract those individuals where there is 'no interaction' (i.e. where these individuals are not within a specified distance threshold from another individual) and give these individuals a unique Group ID containing