AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
January 01, 2022 11:54AM
> I provide all subjects as input and write the results into one .1D or .txt file. In this case, each subject’s values
> are added as a new column. The result is a file that contains as many columns as subjects.

Suppose that your 1D file is called Philipp.1D. I offer two approaches --

1) If the number of columns in Philipp.1D is N and N is not large, try

1dcat Philipp.1D'[0]'\' Philipp.1D'[1]'\' ... Philipp.1D'[N-1]'\' > out.1D
1dcat out.1D\' > out.1D (this line is necessary if you want the output to be one column instead of one row)

If N is large, create a loop to replace the first line above.

2) Do it in R:

x <- read.table('Philipp.1D') (use option 'skip' if you have some number of lines in the header)
write.table(c(x), file = "out.1D", quote = F, row.names = F, col.names = F)

Gang



Edited 1 time(s). Last edit at 01/01/2022 11:55AM by Gang.
Subject Author Posted

Extracting all voxels’ values into one column file (multiple subjects)

Philipp January 01, 2022 06:08AM

Re: Extracting all voxels’ values into one column file (multiple subjects)

gang January 01, 2022 11:54AM

Re: Extracting all voxels’ values into one column file (multiple subjects)

rick reynolds January 01, 2022 12:18PM

Re: Extracting all voxels’ values into one column file (multiple subjects)

Philipp January 01, 2022 02:26PM