search for: yourfilenam

Displaying 15 results from an estimated 15 matches for "yourfilenam".

Did you mean: yourfilename
2017 Oct 25
3
[OT] Bash help
On 10/25/2017 12:33 PM, Robert Arkiletian wrote: > here is a python solution > #!/usr/bin/python > #python 2 (did not check if it works) > f=open('yourfilename') > D={} > for line in f: > email,num = line.split() > if email in D: > D[email] = D[email] + num > else: > D[email] = num > f.close() > for key in D: > print key, D[key] > _______________________________________________ Th...
2017 Oct 25
1
[OT] Bash help
...Wed, Oct 25, 2017 at 9:41 AM, Mark Haney <mark.haney at neonova.net> wrote: >> On 10/25/2017 12:33 PM, Robert Arkiletian wrote: >>> >>> here is a python solution >>> #!/usr/bin/python >>> #python 2 (did not check if it works) >>> f=open('yourfilename') >>> D={} >>> for line in f: >>> email,num = line.split() >>> if email in D: > >>> D[email] = D[email] + int(num) > >>> else: > >>> D[email] = int(num) > >>> f.close() not to...
2017 Oct 25
0
[OT] Bash help
...m struggling to get > psuedocode that works, much less a working script. I know this is off topic, > and if it gets modded out, that's fine. I just can't wrap my brain around > it. > here is a python solution #!/usr/bin/python #python 2 (did not check if it works) f=open('yourfilename') D={} for line in f: email,num = line.split() if email in D: D[email] = D[email] + num else: D[email] = num f.close() for key in D: print key, D[key]
2017 Oct 25
0
[OT] Bash help
On Wed, Oct 25, 2017 at 9:41 AM, Mark Haney <mark.haney at neonova.net> wrote: > On 10/25/2017 12:33 PM, Robert Arkiletian wrote: >> >> here is a python solution >> #!/usr/bin/python >> #python 2 (did not check if it works) >> f=open('yourfilename') >> D={} >> for line in f: >> email,num = line.split() >> if email in D: >> D[email] = D[email] + int(num) >> else: >> D[email] = int(num) >> f.close() >> for key in D: >> print key, D[key] &...
2010 Nov 05
1
newbie question on importing and parsing file by row
Hi, I'm new to R and I have a file with many rows of values. Each row contains a title and values for a contingency table e.g. row 1= title 8 0 37796 47 which is a table called 'title' with values 8 0 37796 47 I would like to know how I can import this using R and for each row calculate a p value using the fisher test. Using each p value I will do multiple a correction. I am
2010 Oct 29
1
transposing a column table
Dear R-user, I need help on how to transpose this column of clustering vector in R with 8768 entries derived from a PAM clustering output in a vertical  view to an excel file   Clustering vector:    [1] 1 1 2 2 1 2 1 2 1 1 2 2 1 2 2 2 2 1 1 1 1 2 2 1 2 2 1 2 2 2 2 2 2 2 2 1 2   [38] 2 1 1 2 2 2 2 2 1 2 1 2 2 2 2 1 2 1 2 2 1 2 2 2 2 2 2 1 2 1 2 2 2 1 1 2 2   [75] 2 1 2 2 2 2 2 2 2 1 1 2 1 2 2 2 2 2
2008 Jun 27
1
Problems exporting graphs
I have trying to figure this out all day so hopefully the answer isn't too obvious. I am able to view a graph in the viewer window. However, I need to export graph outside of the viewer window. Here is the script I am using: > png("Compare.png") > plot(compare$DepthSLI, compare$DischargeSLI, col="blue", xlab = "Average Water Depth (cm)", ylab =
2017 Oct 25
11
[OT] Bash help
I know this is for CentOS stuff, but I'm at a loss on how to build a script that does what I need it to do.? It's probably really logically simple, I'm just not seeing it.? Hopefully someone will take pity on me and at least give me a big hint. I have a file with two columns 'email' and 'total' like this: me at example.com 20 me at example.com 40 you at domain.com
2010 Oct 04
2
Reading Strings in R
Dear All, I know this must be a one-liner, but I am experiencing problems. I need to read lists of long integers stored on a text files, i.e. which reads like "7359700484475972" "7359700484475972" "0" "7359700484475972" "0" "0" "0" "97189954101318722" "0" "0" "7811896690636354"
2008 Jun 15
2
How to take the average of multiple rows
Dear all, I have a matrix, called newdata1, > dim(newdata1) [1] 34176 83 It looks like: EntrezID Name S1 S2 S3 S4 S5..... 1 4076 CAPRIN1 0.1 0.2 0.3... 2 139170 WDR40B 0.4 0.5 0.6... 3 5505 PPP1R2P1 0.3 0.3 0.7... 4 4076 CAPRIN1 0.7 0.3 0.2... 5 139170 WDR40B null 0.8
2008 Apr 17
4
replace NULL with NA in matrix
Hi, I had a matrix with NULL values, which I wanted to replace with NA. Is there an efficient way to do this? Small sample input matrix: A B C D E 1 5222.18 6355.10 4392.68 2607.41 4524.09 2 NULL 257.33 NULL 161.51 119.44 3 NULL 274.80 305.28 443.27 NULL 4 1759.76 1556.45 1224.06 1558.73 1837.09 Tim
2009 Nov 05
4
collumn error when exporting to Excel
Dear all, I am attempting to export my results (data.frame) created with the help of a number of you to Excel. In the procedure my column structure is however lost and all results are placed together into the first Excel column. I have tried: write(), write.table(), write.matrix(), export() and have the same results. I Have checked the import/export FAQ and did a Google search to no avail. Any
2008 Mar 18
7
download.file()
Hi, I wanted to download a file and did the following: --------------------------------------------------------- > fileLink <- 'ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/series/GSE1000/GSE1000_RAW.tar' > download.file(fileLink,'/geoDat') trying URL 'ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/series/GSE1000/GSE1000_RAW.tar' ftp data connection made,
2010 Nov 11
4
Troubleshooting sweave
Hi All, I've reproduced the example from Prof. Friedrich Leisch's webpage. When I write sweave("Example-1.Snw") OR sweave("Example-1.Rnw"), (yes, I renamed them). I get the following error: Writing to file example-1.tex Processing code chunks ... 1 : echo term verbatim Error: chunk 1 Error in library(ctest) : there is no package called 'ctest' Also while
2010 Oct 02
3
Non-Parametric Adventures in R
I just started using R and I'm having all sorts of "fun" trying different things. I'm going to document the different things I'm doing here as a kind of case study. I'm hoping that I'll get help from the community so that I can use R properly. Anyways, in this study, I have demographic data, drug usage data, and side effect data. All of this is loaded into a csv