Thank you both, it works!
--
View this message in context:
http://r.789695.n4.nabble.com/Beginner-question-How-to-replace-part-of-a-filename-in-read-csv-tp3384786p3386724.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project
I would like to use samp as a part of a filename that I can change. My source
files are .csv files with date as the file name, and I would like to be able
to type in the date (later perhaps automate this using list.files) and then
read the csv and write the pdf automatically. I have tried different
I have now advanced to image.plot from the "fields" package, which gives a
nice color scalebar:
image.plot(dat,col=imagecolsmat,xlab="time",ylab="abs")
All that is left now is to change the scale on the x and y axis from 0 to 1
to the actual values. I do not understand why it does not read the pr
It turned out that rearranging the data was indeed the key to get the image I
want. The way I do it now is this:
tt <- read.csv(file="file.csv", header=T, sep=",", dec=".",
stringsAsFactors=F)
names(tt) <- c('time','abs')
dat <- with(tt, table(time, abs))
image(dat,col=rainbow(256))
I'm now modif
Thank you for your quick reply. The change in transparency makes a big
difference. I will have a look at the other packages to see if i can do
multiple colors.
--
View this message in context:
http://r.789695.n4.nabble.com/re-arranging-data-to-create-an-image-or-heatmap-tp3327986p3328227.html
Let me start by introducing myself as a biologist with only a little
knowledge about programming in matlab and R. In the past I have succesfully
created my figures in matlab using the hist3d command, but I have not access
to matlab right now and would like to switch to R.
I have used the plot comm
6 matches
Mail list logo