Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am very new in R Programming, my concern is about importing "Document" kind of files. I say "Document" because when I go to "Get Info" and see what type of data it is, this is what I see:
I know how to open .txt or .csv files, but how about "document" types? Without resorting to exporting this kind of file manually using Excel.
I'm using Mac OS, btw.
Thanks!
You open the file, just like any other .txt file. Simply because it lacks a proper extension name, does not change much. (now if it is not a text file, that is another issue altogether, but I would bet it is)
Try the following:
read.table("~/SMSSpamCollection", header=TRUE, sep="\t")
Change "~/" to the "ptah/to/your/file/"
Mess around with header, sep, etc.
see ?read.table for more help
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last year.
Improve this question
I wanted to embed an image to my binary and used the "include_bytes" macro. The GUI library I wanted to use only accepts [u32] for input and the said macro produces only [u8].
How do I convert a [u8] to a [u32]? I've seen some in the internet but the explanations are a bit too technical for me (I'm only self-taught). There were several options that I saw like bitwise and a method in "u32" from the standard library. Anyone can give an actual code on how to do it? Like study it from there in case I will need it for other files in the future. Thank you. I almost always just understand things via code coz I'm not aware of many technical terms, algos, etc.
using .map(Into::<u32>::into)
fn main() {
assert_eq!([0_u8, 1_u8].map(Into::<u32>::into), [0_u32, 1_u32]);
}
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a folder of around 3,000 music files of all the same type (.flac).
I made an excel (and .txt) list of around 1,000 files in that folder that I want to move to a different folder.
Is there a way to accomplish this without having to manually move each file by referencing the list?
Thank you!
First make a backup of everything!
Yes this is indeed possible, I wrote a little python script for you:
import os
f = open("whichtomove.txt", "r")
filelist = f.read().split("\n")
for x in range(0, len(filelist)):
os.rename(("fromhere/" + str(filelist[x])),("tohere/" + str(filelist[x])))
You just have to change the folder paths and I assumed the list is in this format:
file1.flac
tihs.flac
If the format in your format is another you just have to change the split operator, e.g. to ";" if you split the list entries with ';'
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm unable to read data from this file .. .Its a .dat file & i tried opening using notepad. But after opening I'm unable to read from it.The words are not in English . I tried changing the font ,but it didn't help. I even tried changing the format , nut still it was the same. Can anyone help me with this please ?
The file is shared over here:
https://docs.google.com/file/d/0BwISJR5GZQ88a29yTFZKTnJMYVU/edit?usp=sharing
This is not a text file; it is binary. It has the MIME type application/octet-stream.
This means you need to open it in whatever program it was created with.
You won't be able to read it, because it's not text data. Notepad will not help certainly.
Dat files are used by lots of programs and this file may be for one of those programs. I don't know why this file was shared. Maybe it was savefile of a game or setting of another program.
So in brief, you can't open it like text data and if you don't have any other information about this .DAT file, you should let it go.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am working in Visual Basic. There is facility of filling graphic file in MDIForm through properties option in Visual Basic. But I want to fill it by coding.
I am using this syntax:
MDIForm.Picture = "D:\GraphicFoler\MyPic.jpg"
but it does not work properly.
Please guid me in this respect, I would be very thankful to you.
Use LoadPicture().
Example: MDIForm.Picture = LoadPicture("D:\GraphicFoler\MyPic.jpg")
If your picture resides in the same folder where your application(project) resides, then you could use it like this: MDIForm.Picture = LoadPicture(App.path & "\MyPic.jpg")
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have lots of .nii file. I want to know how to convert .nii file to .nii.gz file?
Thanks
As far as I know, there is nothing special about zipping NIfTI files. In MATLAB, you could simply do:
gzip('niftifilename.nii') % this will return niftifilename.nii.gz
gzip('*.nii') % for multiple nii files to create one .nii.gz
To work with the file again, you can unzip it, using gunzip. I've tried this on my Mac (don't know if this will work on Windows).
Typically, they are volume data, and hence take up a fair bit of disk space. Zipping it is purely for reducing the size of the file, and should not modify data.
You can simply do:
gzip({'*.nii'},outputdir)
Which will zip all your nii files into a nii.gz and place it into outputdir.
From the documentation:
To gzip all .m and .mat files in the current directory and store the
results in the directory archive, type:
gzip({'.m','.mat'},'archive')