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 3 years ago.
Improve this question
Unfortunately I have to deal with a data file with .int file format. This has the effect of littering any search results with unrelated information about integers.
I can't figure out how to open this file in R. I have an example with the Julia language, shown below:
filename = "mnist_train.int"
open(filename) do f
...
end
But when I try to search for a similar function in R, I either find results about opening excel files, results for other languages, or results that deal with integers. Could someone please point me to some resources for dealing with this filetype?
Because I am not sure about what the content type, guess you trying to open a binary file format.
You can have a look at ?readBin
Related
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 days ago.
Improve this question
This is a broader/more-general question, but I find reading .sav files in R to be a nightmare. I use the haven package, but often run into errors due to the format in which .sav files are read (as an ex., of many, it refuses to let me coerce the dbl+lbl format into a numeric data frame).
What I typically do to get around this annoying process is to just save the .sav file as a .csv, then re-read it into R, but I'm sure there's got to be a better way, right?!
n/a this is a more-general question
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 the next link
[1] https://drive.google.com/open?id=0ByCmoyvCype7ODBMQjFTSlNtTzQ
This is a pdf file. The author of a paper gave the list of mutation in this format.
I need to annotate the mutation of this file.
I need a txt or TVS or VCF file to be reading by annovar.
Can you help me to convert this using R or other software in ubuntu?
In principle this is a job for tabulizer but I couldn't get it to work in this instance; I suspect the single table over so many pages confused it.
You can read it in to R as text with the pdftools package easily enough
library(pdftools)
txt <- pdf_text("selection.pdf")
Now txt is an R list, with each element of the list a character string for a single page in the original document. You might be able to do something fancy with regular expressions to convert this to more meaningful data.
However, it makes more sense to ask the original author for their data in an appropriate format. Publishing a 561 page PDF of tabular data is just nuts.
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 inherited legacy code from 2009 that includes the many of the following types of expressions -
variable %in% cs(do, ph, t, secchi)
I get the following error - Error: could not find function "cs" when I try to run anything like this, have not seen 'cs' before, and can't locate any info in help files, google, or on this site so far. I'm guessing it is a deprecated way of concatenating strings but would like to confirm before I update the legacy code.
There is a Cs function in Hmisc package. I think it is that.
See this
library(Hmisc)
Cs(a,cat,dog)
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 8 years ago.
Improve this question
I'm new in R
can you give me some example code I need use to read and write tiff image in R
or just list the step
Thanks
Google is going to be your friend when learning R. It's old enough that everything is out there. :)
Tiff Package
To install this, you might want to try :
install.packages("tiff")
But if you want to use it put this at the top of each script
library("tiff")
To read and write I suggest :
writeTIFF(yourdatahere, getwd())
You don't assign a name to it because you are just outputting data at this point. Here is getting a TIFF.
TiffObject <- readTIFF(yourfile)
Make sure your file is in your working directory. You can set your working directory by doing :
setwd(path)
If you need anything else, just comment and I shall help.
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 have an R dataset (an .Rdata file) that I need to convert to either SAS (.sas7bdat or .xpt) or SPSS (.sav or .por). How can I import this dataset into SAS or SPSS?
If you want to use this in SPSS, consider using the STATS_GETR extension command. It can read R workspace or data files and map appropriate elements directly to an SPSS dataset. This extension command is available from the SPSS Community (www.ibm.com/developerworks/spssdevcentral) website or, for Statistics 22, it can be installed via the Utilities menu.