Re: [R] [ESS] package loadable in R 3.1.1 Rterm but not in emacs/ESS

2014-09-27 Thread Frede Aakmann Tøgersen
Hi If you execute .libPaths() in both instances of R what do you see then? There shouldn't be any differences. Br. Frede T�gersen Sendt fra Samsung mobil Oprindelig meddelelse Fra: Christopher W Ryan Dato:26/09/2014 16.41 (GMT+01:00) Til: R-help ,ess-h...@stat.math.ethz.ch

Re: [R] [R-es] Consulta paquetización con versión R 3.1.0

2014-07-08 Thread Frede Aakmann Tøgersen
Congratulations Eva I have been following this thread loosely. Well in the sense that I really didn't understand what was going on but hopefully thinking that I could learn something from it. Your approach to your particular setup didn't pay any attention to the heed by Duncan. So you hard he

Re: [R] Fwd: Need some assistance in plotting distributions

2014-07-08 Thread Frede Aakmann Tøgersen
Well plot(density(a$frequency), col = "blue") lines(density(b$frequency), col = "green") Where a is as Jim defined it and b similar from the other data file. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance &a

Re: [R] parLapply on sqlQuery (from package RODBC)

2014-07-07 Thread Frede Aakmann Tøgersen
ny so even the corporate language is English our signature in our emails is honoring the regional greetings from the country that we work in. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T

Re: [R] sammon fails with duplicates error, but no duplicates there (MASS package)

2014-07-04 Thread Frede Aakmann Tøgersen
t(data), 2))) > Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind Systems A/S This e-m

Re: [R] How to hide the vector number output in write.table function?

2014-07-03 Thread Frede Aakmann Tøgersen
Setting row.names = FALSE? Br. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: dstrick1 Dato:03/07/2014 19.02 (GMT+01:00) Til: r-help@r-project.org Emne: [R] How to hide the vector number output in write.table function? What I'm trying to do should be simple enoug

Re: [R] parLapply on sqlQuery (from package RODBC)

2014-07-03 Thread Frede Aakmann Tøgersen
names) > query [1] "select id from table where name in ('A','B','C','D','E')" > > dataFromDB <- sqlQuery(dbConn, query) This should work for MS SQL and MySQL servers. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgerse

Re: [R] Change database in SQL Server using RODBC

2014-06-30 Thread Frede Aakmann Tøgersen
Hi I can see that you do have troubles understanding how all this works using the RODBC package. Peter wasn't really being helpful to you. This is something that is quite difficult to help with not sitting beside you. Do you not having some local help from e.g. the IT department? However for a

Re: [R] Change database in SQL Server using RODBC

2014-06-29 Thread Frede Aakmann Tøgersen
Hi See inline below for my comments. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind S

Re: [R] read a file of text with read.table

2014-06-26 Thread Frede Aakmann Tøgersen
which columns should not be converted to factors. Note: to suppress all conversions including those of numeric columns, set 'colClasses = "character"'. Note that 'as.is' is specified per column (not per variable) a

Re: [R] read a file of text with read.table

2014-06-26 Thread Frede Aakmann Tøgersen
<- read.table(text = "absfjdslf + jfdldskjff + jfsldfjslk", + colClasses = "character") > str(tmp) 'data.frame': 3 obs. of 1 variable: $ V1: chr "absfjdslf" "jfdldskjff" "jfsldfjslk" Yours sincerely / Med venlig hilsen Frede Aakman

Re: [R] Making several plots using a loop function

2014-06-24 Thread Frede Aakmann Tøgersen
Well you can use the main argument of the plot function together with a call to sprintf(). Like this: main = sprintf("Plot %s", i) Best regards Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: li li Dato:24/06/2014 15.19 (GMT+01:00) Til: r-help Emne: [R] Making sev

Re: [R] extract a subset of non-contiguous elements of a matrix

2014-06-19 Thread Frede Aakmann Tøgersen
You are really not helpful here. Are we talking the same scientific language? Br. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: carol white Dato:19/06/2014 15.46 (GMT+01:00) Til: Frede Aakmann Tøgersen ,Bart Kastermans Cc: r-help@r-project.org Emne: Re: [R] extrac

Re: [R] extract a subset of non-contiguous elements of a matrix

2014-06-19 Thread Frede Aakmann Tøgersen
As Peter and Bart I really have a problem understanding you. Perhaps if you tell us what your desired result is going to used for we can be more helpful. You can do that using your latest example. In that example you want a matrix of sets of row and column indices. This will probably have to be

Re: [R] data format setting

2014-06-13 Thread Frede Aakmann Tøgersen
Hi Eliza To me it seems like that you're not thinking before you messing about with the data before an analysis. The years with data for 366 days is leap years. It happens every fourth year and the extra day falls on the 29th of februar. I guess it is the results from the dcast function that s

Re: [R] SAS VS R - What type of analysis is better?

2014-06-06 Thread Frede Aakmann Tøgersen
Hi SAS is famous for handling large data sets. For more than 10 years ago S+ introduced a module for large data sets. Never used it, more money for license for a poor research institute. Today I have a laptop with 8 Gb. If that's not enough then the head nodes on our cluster has 64 Gb and some

Re: [R] detect escape character

2014-06-05 Thread Frede Aakmann Tøgersen
Yes, and at that time there were in fact some people in the department studying biodiversity or perhaps I should say the lack of biodiversity in the modern agricultural farmland in Denmark. And now some years later things are sadly not better. Today the plants I'm studying is wind power plants,

Re: [R] detect escape character

2014-06-03 Thread Frede Aakmann Tøgersen
information, thank you!. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind Systems A

Re: [R] RODBC and PosgreSQL problems

2014-05-31 Thread Frede Aakmann Tøgersen
Hi Not sure was is going on! Can you try to do the sqlQuery without the paste function? Like this: sqlQuery(DRCch,"SELECT * FROM tblCeramicWare")) By the way your sqlTables doesn't list the tblCeramicWare table. Br. Frede Aakmann Tøgersen Sendt fra Samsung mobil

Re: [R] Second axis on bottom of graph

2014-05-28 Thread Frede Aakmann Tøgersen
Hi Hurr I'm getting curious! You have now spent several weeks on this plot. One reason to do this if the journal request it. Is that the case? Or is it your own hard minded way to have your plot made the way you like. In my mind a very good plot support ones data. Is that what you want? Does

Re: [R] How to unstack three columns into rows?

2014-05-27 Thread Frede Aakmann Tøgersen
1a 31 55 62 NA NA NA 42v 42 NA NA 40 NA NA 56a 30 23 74 84 10 NA > Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.ves

Re: [R] subsetting to exclude different values for each subject in study

2014-05-23 Thread Frede Aakmann Tøgersen
Hi Monaly I guess that if you made the neighborhood data available (using dput()) then Arun will easily show you how to automatically with only a couple of code lines instead of those many lines you had to make by hand. Have a nice day. Yours sincerely / Med venlig hilsen Frede Aakmann

Re: [R] approxfun question

2014-05-21 Thread Frede Aakmann Tøgersen
Like this: > x <- 1:10 > y <- rnorm(10) > f <- approxfun(x, y) > f function (v) .approxfun(x, y, v, method, yleft, yright, f) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Servic

Re: [R] Mean of colMeans

2014-05-21 Thread Frede Aakmann Tøgersen
Hhhhmmhhhm, but is that not the same as mean(as.matrix(x)) ? Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com

Re: [R] stop subscribing mailing list

2014-05-21 Thread Frede Aakmann Tøgersen
Yes and you do that by going to https://stat.ethz.ch/mailman/listinfo/r-help and fill in the required information. Sorry to loose you on this list. Best regards Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: Steve Friedman Dato:21/05/2014 16.03 (GMT+01:00) Til:

Re: [R] R save with encoding...

2014-05-19 Thread Frede Aakmann Tøgersen
Hi See ?plotmath. Something like this: plot(1, 1, main = expression(paste("INTERVALS ", lambda))) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135

Re: [R] needs help in augented plot

2014-05-16 Thread Frede Aakmann Tøgersen
rely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind Systems A/S This e-mail is subject to our e-mail disclaimer

Re: [R] needs help in augented plot

2014-05-15 Thread Frede Aakmann Tøgersen
r this: plot(augFM1, strip = strip.custom(par.strip.text = list(cex = 0.5))) If the latter I will leave it as an exercise to you to change the default strip height. Google for r lattice strip height Have a nice day. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D

Re: [R] for loop using index values

2014-05-14 Thread Frede Aakmann Tøgersen
Hi David Please keep the r-help list on when you reply, I’m not your personal consultant and David Winsemius would also like see how this progress since he is also trying to help you. I’m still guessing, so is this what you want For (i in c(1,5,8)){ } Please, if you hope to get some

Re: [R] for loop using index values

2014-05-14 Thread Frede Aakmann Tøgersen
w) > 6)) [1] 2 3 By the way there is a function called subset so you could run into trouble later on when calling your list for subset. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solution

Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-14 Thread Frede Aakmann Tøgersen
Perhaps, but Arun answered you question using regular expressions. So didn't that not do the job? Br. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: Hurr Dato:14/05/2014 22.48 (GMT+01:00) Til: r-help@r-project.org Emne: Re: [R] Put short string labels vertically

Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-14 Thread Frede Aakmann Tøgersen
Have a look at regular expression in R! Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind

Re: [R] matrix column division by vector

2014-05-14 Thread Frede Aakmann Tøgersen
Have a look at ?sweep Br. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: carol white Dato:14/05/2014 16.53 (GMT+01:00) Til: r-h...@stat.math.ethz.ch Emne: [R] matrix column division by vector Hi, What is the elegant script to divide the columns of a matrix by the res

Re: [R] gumbel distribution

2014-05-14 Thread Frede Aakmann Tøgersen
Like in ?qqplot Br. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: eliza botto Dato:14/05/2014 15.19 (GMT+01:00) Til: smartpink...@yahoo.com,r-help@r-project.org Emne: Re: [R] gumbel distribution Dear Arun, Rolf and Frede, Thankyou very much for youe help. I mana

Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-14 Thread Frede Aakmann Tøgersen
ories. So the first argument to install.packages() should be a string or a vector of strings. In the first case you install one package, in the latter you install a list of packages. So you will probably get plotrix installed if you do install.packages("plotrix") Or install.pack

Re: [R] gumbel distribution

2014-05-14 Thread Frede Aakmann Tøgersen
Oh, I see now. I'm blushing. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind Sys

Re: [R] Put short string labels vertically near tick marks on bottom axis

2014-05-14 Thread Frede Aakmann Tøgersen
the session you have open). 2) Launch exactly the code above in the newly opened session. 3) If everything works be happy. 4) If you get some errors then copy and paste the whole output in that session and post it to the list. Then perhaps we may be able to help you. Certainly not before that. H

Re: [R] gumbel distribution

2014-05-13 Thread Frede Aakmann Tøgersen
Don't know if I understand your last comment but I surely don't think that the Weibull and Gumbel distributions are the same. See their density function on e.g. Wikipedia. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance

Re: [R] gumbel distribution

2014-05-13 Thread Frede Aakmann Tøgersen
and 'scale'. Usage: dweibull(x, shape, scale = 1, log = FALSE) pweibull(q, shape, scale = 1, lower.tail = TRUE, log.p = FALSE) qweibull(p, shape, scale = 1, lower.tail = TRUE, log.p = FALSE) rweibull(n, shape, scale = 1) Yours sincerely / Med venlig hilsen Fr

Re: [R] efficient sine interpolation

2014-05-12 Thread Frede Aakmann Tøgersen
Hi Why not use functional data analysis. There is an R package called fda to help you. See http://www.psych.mcgill.ca/misc/fda/ex-weather-a1.html for an example exploring temperature from different locations. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D

Re: [R] R / JMP interface

2014-05-07 Thread Frede Aakmann Tøgersen
Wov, so SAS/JMP has an interface to R. I'm amazed and it looks like SAS is taking the "competition" from R seriously. I'll check it out. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: Robert Douglas Kinley Dato:07/05/2014 18.19 (GMT+01:00) Til: r-help@r-project.or

Re: [R] list.files accessing subdirectory as relative path?

2014-05-05 Thread Frede Aakmann Tøgersen
Hi ".." is the parent directory whereas "." is the current directory, so you probably want list.files(path = "./Least Developed Countries") instead of list.files(path = "../Least Developed Countries") Yours sincerely / Med venlig hilsen Frede Aakmann

Re: [R] Problem with products in R ?

2014-05-04 Thread Frede Aakmann Tøgersen
? This is on my Windows 8 OS, but you can track it many years back!! Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com

Re: [R] position of a string in a data frame

2014-04-30 Thread Frede Aakmann Tøgersen
e [1,] FALSE FALSE FALSE [2,] FALSE TRUE FALSE [3,] FALSE FALSE FALSE > which(foo == "sum", arr.ind = TRUE) row col [1,] 2 2 > But can one risk this to fail if the class of some of the columns cannot be compared to a string? Yours sincerely / Me

Re: [R] subset of obersevation depending on multiple conditions

2014-04-28 Thread Frede Aakmann Tøgersen
So Christoph now have 3 methods giving him three different results. Of course it is not really clear what Christoph really wants ;-) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9

Re: [R] subset of obersevation depending on multiple conditions

2014-04-28 Thread Frede Aakmann Tøgersen
quot;, h = TRUE) mydat$NdayBefore <- c(NA, mydat[-nrow(mydat), "N"]) head(mydat) subset(mydat, N <= 0.3) subset(mydat, N <= 0.3 & NdayBefore <= 0.3) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling

Re: [R] Linear line on pairs plot

2014-04-25 Thread Frede Aakmann Tøgersen
No it is difficult to say when I don’t know what you did in Excel and Sigma Plot. The latter I don’t know and do not use it my self. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5

Re: [R] Linear line on pairs plot

2014-04-25 Thread Frede Aakmann Tøgersen
irs.panel() function and you have it. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind S

Re: [R] finding value for a parameter in an equation

2014-04-23 Thread Frede Aakmann Tøgersen
just copying those from your email. Given those you get what I showed to you. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: Andras Farkas Dato:23/04/2014 12.11 (GMT+01:00) Til: Frede Aakmann Tøgersen ,r-help@r-project.org Emne: Re: RE: [R] finding value for a para

Re: [R] finding value for a parameter in an equation

2014-04-23 Thread Frede Aakmann Tøgersen
Sorry I made a copy and paste error. To get all the details of the curves between 0 and I had to use: E <- seq(0,10, len = 2000) Sorry for the inconvenience. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Tec

Re: [R] finding value for a parameter in an equation

2014-04-23 Thread Frede Aakmann Tøgersen
ot [1] -9.45929e-05 $iter [1] 9 $init.it [1] NA $estim.prec [1] 6.103516e-05 But Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http:/

Re: [R] Loop to extract from variables in the workspace

2014-04-21 Thread Frede Aakmann Tøgersen
a huge dataframe and during the loop calculated the row indices of that dataframe for each raster into the result from extract should be put. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutio

Re: [R] Loop to extract from variables in the workspace

2014-04-21 Thread Frede Aakmann Tøgersen
hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind Systems A/S This e-mail is subject to our e-mail disclaimer statement

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Frede Aakmann Tøgersen
o :-( Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind Systems A/S This e-mail is subjec

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Frede Aakmann Tøgersen
Hi Couldn't find a zip file in the archives. Why didn't 'R CMD build' (in a command shell on Windows) not make a zip file? I did try to build from the climatol library that holds the typical files as DESCRIPTION, LICENSE, etc. as well as folders like R, etc. Did you see the debug information o

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-20 Thread Frede Aakmann Tøgersen
*, "conn_id")= Browse[2]> file description class "climatol_2.2.tar.gz/DESCRIPTION" "gzfile" mode text &quo

Re: [R] help incorporating data subset lengths in function with ddply

2014-04-16 Thread Frede Aakmann Tøgersen
tmp str(tmp) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind Systems A/S This e-mai

Re: [R] Values cells

2014-04-16 Thread Frede Aakmann Tøgersen
(min, max) See the values entry. Since this is a color image there are 3 bands. What you see above is for the first band ("red"). Going from 0 to 255 for red is no surprise. You will probably see the same for green and blue as well. What are you really looking for? Yours sincerely /

Re: [R] netCDF to raster and spatial projection

2014-04-16 Thread Frede Aakmann Tøgersen
e : in memory names : part.a values : 0, 1 (min, max) The difference can be seen by plotting. plot(rasterMG) plot(rasterMG.proj) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions

Re: [R] netCDF to raster and spatial projection

2014-04-16 Thread Frede Aakmann Tøgersen
lerance, round) : dimension 1 : coordinate intervals are not constant > A warning and an error indicates that the projection results in something that is not on a regular grid. I don't know what to do but to read some more of the documentation for sp, rgdal, etc. Hopefully somebody come

Re: [R] netCDF to raster and spatial projection

2014-04-16 Thread Frede Aakmann Tøgersen
lt;- spTransform(rasterDF1, crs("+init=epsg:21781")) > Also there is a spTransform both in the rgdal and sp packages. So are they masking each other? rgdal should be before sp in the search() list. I cannot be of more help since you provided no data. Yours sincerely / Med venlig hils

Re: [R] calling in inverted commas

2014-04-12 Thread Frede Aakmann Tøgersen
Oh, I see. Actually I forgot to check whether if could be an advantage to use the URLencoding () function on queryUrl. I'll check later. Br. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: arun Dato:12/04/2014 12.45 (GMT+01:00) Til: Frede Aakmann Tøgersen Cc: Eliz

Re: [R] calling in inverted commas

2014-04-12 Thread Frede Aakmann Tøgersen
Hi Arun It seems to be an error on the server side and not on the client. The error on the server results in the client receiving a string giving the type of error on the server. And this doesn't work with read.table of course. So if one wants to query for thousands of point one really needs to

Re: [R] Save file as Fixed Width using sprintf()

2014-04-12 Thread Frede Aakmann Tøgersen
-0.628971-0.312928 1.434294-0.637825-1.605758 0.645651 0.248138-1.161756 > With this approach I don't think you can get rid of the space between positive numbers because there should be place for a minus sign for negative values. If that's what you want Yours sincerely / Med

Re: [R] calling in inverted commas

2014-04-12 Thread Frede Aakmann Tøgersen
t;list", nrow(df2)) names(precipList) <- fileNames for (i in 1:nrow(df2)){ queryUrl <- sprintf(urlPattern, df2[i, 1], df2[i, 2], df2[i, 1], df2[i, 2]) u <- url(queryUrl, open = "r") precipList[[i]] <- read.table(u, skip = 4, header = TRUE, na.strings = "-.9

Re: [R] how to select an element from a vector based on a probability

2014-04-10 Thread Frede Aakmann Tøgersen
I think you have calculated the wrong probabilities. Shouldn't it be > x <- c(2,2,6,2,1,1,1,3) > MASS::fractions(table(x)/length(x)) x 1 2 3 6 3/8 3/8 1/8 1/8 > Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Perfo

Re: [R] Not able to convert data.frame to numeric properly

2014-04-08 Thread Frede Aakmann Tøgersen
gets the label as a numeric > as.numeric(as.character(a[,1])) [1] 2.2194 > > ## do this for the first 2 columns > for (i in 1:2) a[,i] <- as.numeric(as.character(a[,i])) > > ## the structure of a > str(a) 'data.frame': 1 obs. of 4 variables: $ GHP: num 2.22

Re: [R] Not able to convert data.frame to numeric properly

2014-04-08 Thread Frede Aakmann Tøgersen
We can't say because we don't know how a was created. Please email the output from str(a) and dput(a) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135

Re: [R] Plotting does odd line thing

2014-04-08 Thread Frede Aakmann Tøgersen
See ? plot.default. Add the log = "y" to your call. Remember to set ylim to positive values since log only takes positive values, e.g. ylim = c(1e-6, 0.1). Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Techno

Re: [R] Ignore escape characters in a string...

2014-04-08 Thread Frede Aakmann Tøgersen
R. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com<mailto:fr...@vestas.com> http://www.vestas.com<http://www.vestas.com/> Company reg.

Re: [R] Ignore escape characters in a string...

2014-04-08 Thread Frede Aakmann Tøgersen
Yes R on Windows have something like that you mentioned. I have only tried it in conjunction with read.table. I'm a bit surprised about the \\ on a linux OS. I'm also surprised that in a file manager on Windows you can paste e.g. C:/users/frtog/Desktop and it can find its way to the folder. Wei

Re: [R] locating a data value in 3-dimensional data set

2014-04-08 Thread Frede Aakmann Tøgersen
Sorry forgot to mention that you probably are better of using <= and >= instead of == Br. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: mamuash bukana Dato:08/04/2014 15.51 (GMT+01:00) Til: r-help@r-project.org Emne: [R] locating a data value in 3-dimensional data

Re: [R] locating a data value in 3-dimensional data set

2014-04-08 Thread Frede Aakmann Tøgersen
Hi I know there is a arr.index (or something like that, I'm not near my R right now) argument to which (). I have used it for 2-dim arrays and never for higher dimensions. But try it out by setting the argument to TRUE. Br. Frede Sendt fra Samsung mobil Oprindelig meddelelse -

Re: [R] Plotting does odd line thing

2014-04-07 Thread Frede Aakmann Tøgersen
t;ESSR" "package:utils" [10] "package:datasets" "package:methods" "Autoloads" [13] "package:base" Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance &

Re: [R] Simulating data

2014-04-04 Thread Frede Aakmann Tøgersen
5% and 75% quantile q25 <- qnorm(0.25, mean = Mean, sd = SD) q75 <- qnorm(0.75, mean = Mean, sd = SD) yourstats <- matrix(c(RangeLower, q25, Median, q75, RangeUpper), ncol = 1) bpstats$stats <- yourstats bxp(bpstats, outl = FALSE) Yours sincerely / Med venlig hilsen Frede Aakma

Re: [R] Doing box plots for part of the data??

2014-04-03 Thread Frede Aakmann Tøgersen
Or using the original data and the subset argument of boxplot: boxplot(Barium~Well.ID,data=mydata, main="Barium", ylab="mg/L", subset = Well.ID %in% c("MW-1", "MW-2")) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D.

Re: [R] Equation of a curve

2014-04-03 Thread Frede Aakmann Tøgersen
venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind Systems A/S This e-mail is subject to our e-mail disclaimer s

Re: [R] text minning script

2014-04-03 Thread Frede Aakmann Tøgersen
;-) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com<mailto:fr...@vestas.com> http://www.vestas.com<http://www.vestas.com/> Company re

Re: [R] text minning script

2014-04-03 Thread Frede Aakmann Tøgersen
regard" or something like that. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind

Re: [R] A vector of normal distributed values with a sum-to-zero constraint

2014-04-02 Thread Frede Aakmann Tøgersen
m 2013 and can be found in the archives and "robComposition" still maintained. Hope that helps, it is help for yourself to find a solution. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Serv

Re: [R] MULTIPLE LEVELS for a SINGLE VALUE in a dataframe, how do I remove these?

2014-04-01 Thread Frede Aakmann Tøgersen
. However you can now do this. antdist$ts <- as.character(antdist$ts) antdist$ts <- as.POSIXct(strptime(antdist$ts, format = "%m/%d/%Y %H:%M:%S")) See ?factor, ?as.POSIXct, ?strptime Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Pl

Re: [R] importing multiple text files in R

2014-04-01 Thread Frede Aakmann Tøgersen
Try mixedsort in gtools package Br. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: eliza botto Dato:01/04/2014 18.10 (GMT+01:00) Til: r-help@r-project.org Emne: [R] importing multiple text files in R Dear useRs, I have a number of text file located at a certain lo

Re: [R] index polygons

2014-03-27 Thread Frede Aakmann Tøgersen
Perhaps have a look at the sp package and especially the over function. Br. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: Leonid Shvartser Dato:27/03/2014 20.27 (GMT+01:00) Til: r-help@r-project.org Emne: [R] index polygons Hello, I need to compare a polygon with

Re: [R] reading dataset

2014-03-27 Thread Frede Aakmann Tøgersen
<- c(n, m) image(rstn) rsnw <- ccc[50401:75600] rsnw[rsnw < -90] <- NA dim(rsnw) <- c(n, m) image(rsnw) I will leave it to you to interpret rstn and rsnw in regards to prcp. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performanc

Re: [R] Bayesian Regression with half-normal distributions

2014-03-24 Thread Frede Aakmann Tøgersen
Hi Perhaps you can find something at http://cran.r-project.org/web/views/Bayesian.html. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.

Re: [R] points with-in boundaries of a map

2014-03-24 Thread Frede Aakmann Tøgersen
ge/ray crossing method in Eric's wording. The performance is between the best as shown by Eric. I know there are other implementations in R in other packages but I do not have the full overview of all methods. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D

Re: [R] points with-in boundaries of a map

2014-03-24 Thread Frede Aakmann Tøgersen
p("world", "ireland", plot = FALSE, namesonly = TRUE)) ireland <- map("world", "Ireland:Achill Island", exact = TRUE, xlim = xr, ylim = yr) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance &am

Re: [R] Adding points to a topo map

2014-03-22 Thread Frede Aakmann Tøgersen
otGEOmapXY(japmap, LIM=c(PLOC$LON[1], PLOC$LAT[1],PLOC$LON[2], PLOC$LAT[2]) , PROJ=PROJ, add = FALSE ) pointsGEOmapXY(lon = 139, lat = 35.5, PROJ = PROJ, col = "red", pch = "*", cex = 5) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgerse

Re: [R] geoghraphical coordinate

2014-03-21 Thread Frede Aakmann Tøgersen
Actually if you're missing the north-east part of the whole island do: map('worldHires', c('Ireland', 'UK:Northern Ireland') Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology &a

Re: [R] geoghraphical coordinate

2014-03-21 Thread Frede Aakmann Tøgersen
1YMsU4uUJcikkgXZ_4HwCQ See the first hit: http://www.arcgis.com/home/item.html?id=ae74a8497a1041669a9d2165a0f450b6 In most cases there are R packages dealing with the different formats. Just google the CRAN. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Per

Re: [R] Which() missing a number

2014-03-18 Thread Frede Aakmann Tøgersen
cerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind Systems A/S This e-mail is subject to our e-mail discla

Re: [R] plot a list of trellis objects

2014-02-18 Thread Frede Aakmann Tøgersen
Hopefully good suggestions from our side. Well, is it not feasible to point people to man pages that thinks _list_ is the same as _c_ , so tomorrow I will file a bug (what is that called for instructions) report (if I can remember). Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen

Re: [R] 3D graphics

2014-02-18 Thread Frede Aakmann Tøgersen
;cex.axis"), cex.lab=par("cex.lab"), font.axis=par("font.axis"), font.lab=par("font.lab"), lty.axis=par("lty"), lty.grid=par("lty"), lty.hide=NULL, lty.hplot=par("lty"), log="", ...)

Re: [R] plot a list of trellis objects

2014-02-18 Thread Frede Aakmann Tøgersen
Sorry this should of course be for all on R-help. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name

Re: [R] plot a list of trellis objects

2014-02-18 Thread Frede Aakmann Tøgersen
tion("layout.heights")$panel, panel.width = lattice.getOption("layout.widths")$panel, save.object = lattice.getOption("save.object"), panel.error = lattice.getOption("panel.error"), prefix, ...) To be in superi

Re: [R] plot a list of trellis objects

2014-02-18 Thread Frede Aakmann Tøgersen
that a LIST) However this works: do.call(grid.arrange,c(lattice.plots, ncol = 1)) WHAT IS THE DIFFERNCE BETWEEN c() and list() Have a nice day to all of you. And thank you all developers for R. I cannot live without it. Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specia

Re: [R] plot a list of trellis objects

2014-02-17 Thread Frede Aakmann Tøgersen
yplot(rnorm(10) ~ 1:10, type = "b")) do.call(grid.arrange, lattice.plots) There is most likely a loop hidden somewhere in the do.call function ;-) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & S

Re: [R] Ignore errors and proceed to next

2014-02-14 Thread Frede Aakmann Tøgersen
Hi See ?try ?tryCatch So you still want to do these distribution tests even though you have been warned not to? Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547

Re: [R] Problem with POSIXt time zone

2014-02-14 Thread Frede Aakmann Tøgersen
ata with timestamps those are usually save in the "UTC" = "GMT" zone format because we get data from all over the world and we do not want to deal with day light saving times. So do this to begin with in the R session: > Sys.setenv(TZ="GMT") ## and then we have: &

Re: [R] Strange error on text assignment to variable

2014-01-21 Thread Frede Aakmann Tøgersen
Hi Well, for is a basic control-flow construct and as such a reserved word in R. See e.g. ?for Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@ve

  1   2   >