Sponsored Content
Full Discussion: MATRIX to CSV
Top Forums Shell Programming and Scripting MATRIX to CSV Post 302824491 by kraterions on Friday 21st of June 2013 03:37:25 AM
Old 06-21-2013
Hello guys,


here the output of yoda code:

Code:
SUPERUSER,relatedUSER,TOTFrequencyrelations,(1)Frequency,(0)Frequency,(-1)Frequency,VALUE
userT,userH,1,0,1,0,0
userT,userB,1,0,1,0,0
userU,userB,1,1,0,0,1
userU,userF,1,0,1,0,0
userU,userH,1,0,1,0,0
userU,userJ,1,1,0,0,1
userA,userJ,1,0,0,1,-1
userA,userN,1,1,0,0,1
userA,userB,3,1,0,2,-0,3
userA,userC,3,0,0,3,-1
userA,userD,1,0,0,1,-1
userA,userF,1,0,0,1,-1
userB,userA,3,1,0,2,-0,3
userB,userC,2,0,0,2,-1
userB,userD,2,1,0,1,0
userB,userH,1,0,1,0,0
userB,userJ,1,1,0,0,1
userB,userN,3,2,0,1,0,3
userB,userT,1,0,1,0,0
userB,userU,1,1,0,0,1
userC,userA,3,0,0,3,-1
userC,userB,2,0,0,2,-1
userC,userF,1,0,0,1,-1
userD,userA,1,0,0,1,-1
userD,userB,2,1,0,1,0
userD,userJ,1,0,0,1,-1
userD,userN,2,1,0,1,0
userF,userA,1,0,0,1,-1
userF,userC,1,0,0,1,-1
userF,userG,1,0,1,0,0
userF,userH,2,0,2,0,0
userF,userU,1,0,1,0,0
userG,userF,1,0,1,0,0
userG,userH,2,0,2,0,0
userG,userN,1,0,1,0,0
userH,userB,1,0,1,0,0
userH,userF,2,0,2,0,0
userH,userG,2,0,2,0,0
userH,userN,1,0,1,0,0
userH,userT,1,0,1,0,0
userH,userU,1,0,1,0,0
userJ,userA,1,0,0,1,-1
userJ,userB,1,1,0,0,1
userJ,userD,1,0,0,1,-1
userJ,userU,1,1,0,0,1
userN,userA,1,1,0,0,1
userN,userB,3,2,0,1,0,3
userN,userD,2,1,0,1,0
userN,userG,1,0,1,0,0
userN,userH,1,0,1,0,0

DGPickett, you are right, doesn´t fit the model

many thanks for you attention

---------- Post updated at 02:37 AM ---------- Previous update was at 02:28 AM ----------

Hi durden_tyler,

here the output of your code:


Code:
String found where operator expected at script.pl line 19, near "'"
  (Might be a runaway multi-line '' string starting on line 2)
	(Missing semicolon on previous line?)
syntax error at script.pl line 19, near "'"
Execution of script.pl aborted due to compilation errors.

many thanks for your help!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

diagonal matrix to square matrix

Hello, all! I am struggling with a short script to read a diagonal matrix for later retrieval. 1.000 0.234 0.435 0.123 0.012 0.102 0.325 0.412 0.087 0.098 1.000 0.111 0.412 0.115 0.058 0.091 0.190 0.045 0.058 1.000 0.205 0.542 0.335 0.054 0.117 0.203 0.125 1.000 0.587 0.159 0.357... (11 Replies)
Discussion started by: yifangt
11 Replies

2. Shell Programming and Scripting

2 problems: Mailing CSV file / parsing CSV for display

I have been trying to find a good solution for this seemingly simple task for 2 days, and I'm giving up and posting a thread. I hope someone can help me out! I'm on HPUX, using sqlplus, mailx, awk, have some other tools available, but can't install stuff that isn't already in place (without a... (6 Replies)
Discussion started by: soldstatic
6 Replies

3. Ubuntu

How to convert full data matrix to linearised left data matrix?

Hi all, Is there a way to convert full data matrix to linearised left data matrix? e.g full data matrix Bh1 Bh2 Bh3 Bh4 Bh5 Bh6 Bh7 Bh1 0 0.241058 0.236129 0.244397 0.237479 0.240767 0.245245 Bh2 0.241058 0 0.240594 0.241931 0.241975 ... (8 Replies)
Discussion started by: evoll
8 Replies

4. Shell Programming and Scripting

awk? adjacency matrix to adjacency list / correlation matrix to list

Hi everyone I am very new at awk but think that that might be the best strategy for this. I have a matrix very similar to a correlation matrix and in practical terms I need to convert it into a list containing the values from the matrix (one value per line) with the first field of the line (row... (5 Replies)
Discussion started by: stonemonkey
5 Replies

5. Shell Programming and Scripting

CSV to SQL insert: Awk for strings with multiple lines in csv

Hi Fellows, I have been struggling to fix an issue in csv records to compose sql statements and have been really losing sleep over it. Here is the problem: I have csv files in the following pipe-delimited format: Column1|Column2|Column3|Column4|NEWLINE Address Type|some descriptive... (4 Replies)
Discussion started by: khayal
4 Replies

6. Shell Programming and Scripting

Perl search csv fileA where two strings exist on another csv fileB

Hi I have two csv files, with the following formats: FileA.log: Application, This occured blah Application, That occured blah Application, Also this AnotherLog, Bob did this AnotherLog, Dave did that FileB.log: Uk, London, Application, datetime, LaterDateTime, Today it had'nt... (8 Replies)
Discussion started by: PerlNewbRP
8 Replies

7. Shell Programming and Scripting

3 column .csv --> correlation matrix; awk, perl?

Greetings, salutations. I have a 3 column csv file with ~13 million rows and I would like to generate a correlation matrix. Interestingly, you all previously provided a solution to the inverse of this problem. Thread title: "awk? adjacency matrix to adjacency list / correlation matrix to list"... (6 Replies)
Discussion started by: R3353
6 Replies

8. Shell Programming and Scripting

Comparing 2 CSV files and sending the difference to a new csv file

(say) I have 2 csv files - file1.csv & file2.csv as mentioned below: file1.csv ID,version,cost 1000,1,30 2000,2,40 3000,3,50 4000,4,60 file2.csv ID,version,cost 1000,1,30 2000,2,45 3000,4,55 6000,5,70 ... (1 Reply)
Discussion started by: Naresh101
1 Replies

9. Shell Programming and Scripting

Compare 2 csv files in ksh and o/p the difference in a new csv file

(say) I have 2 csv files - file1.csv & file2.csv as mentioned below: file1.csv ID,version,cost 1000,1,30 2000,2,40 3000,3,50 4000,4,60 file2.csv ID,version,cost 1000,1,30 2000,2,45 3000,4,55 6000,5,70 The... (7 Replies)
Discussion started by: Naresh101
7 Replies

10. Shell Programming and Scripting

Match columns from two csv files and update field in one of the csv file

Hi, I have a file of csv data, which looks like this: file1: 1AA,LGV_PONCEY_LES_ATHEE,1,\N,1,00020460E1,0,\N,\N,\N,\N,2,00.22335321,0.00466628 2BB,LES_POUGES_ASF,\N,200,200,00006298G1,0,\N,\N,\N,\N,1,00.30887539,0.00050312... (10 Replies)
Discussion started by: djoseph
10 Replies
Locale::Codes::Script(3pm)				 Perl Programmers Reference Guide				Locale::Codes::Script(3pm)

NAME
Locale::Codes::Script - standard codes for script identification SYNOPSIS
use Locale::Codes::Script; $script = code2script('phnx'); # 'Phoenician' $code = script2code('Phoenician'); # 'Phnx' $code = script2code('Phoenician', LOCALE_CODE_NUMERIC); # 115 @codes = all_script_codes(); @scripts = all_script_names(); DESCRIPTION
The "Locale::Codes::Script" module provides access to standards codes used for identifying scripts, such as those defined in ISO 15924. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 15924 four-letter codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying scripts. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $script = code2script('phnx','alpha'); $script = code2script('phnx',LOCALE_SCRIPT_ALPHA); The codesets currently supported are: alpha, LOCALE_SCRIPT_ALPHA This is a set of four-letter (capitalized) codes from ISO 15924 such as 'Phnx' for Phoenician. It also includes additions to this set included in the IANA language registry. The Zxxx, Zyyy, and Zzzz codes are not used. This is the default code set. num, LOCALE_SCRIPT_NUMERIC This is a set of three-digit numeric codes from ISO 15924 such as 115 for Phoenician. ROUTINES
code2script ( CODE [,CODESET] ) script2code ( NAME [,CODESET] ) script_code2code ( CODE ,CODESET ,CODESET2 ) all_script_codes ( [CODESET] ) all_script_names ( [CODESET] ) Locale::Codes::Script::rename_script ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::Script::add_script ( CODE ,NAME [,CODESET] ) Locale::Codes::Script::delete_script ( CODE [,CODESET] ) Locale::Codes::Script::add_script_alias ( NAME ,NEW_NAME ) Locale::Codes::Script::delete_script_alias ( NAME ) Locale::Codes::Script::rename_script_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::Script::add_script_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::Script::delete_script_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.unicode.org/iso15924/ Home page for ISO 15924. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2012 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.2 2012-10-11 Locale::Codes::Script(3pm)
All times are GMT -4. The time now is 06:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy