Re: [R] how to calculate a numeric's digits count?

2014-10-24 Thread Olivier Crouzet
Le Fri, 24 Oct 2014 14:11:08 +0800 (CST), PO SU a écrit : > > Ok,  what i want is  find how many numbers after  . in a numeric ,and > i don't know if there is already exists a function to do it( i wrote > one by myself which will be showed later). e.g. 1.234 has 3 numbers > after . 1 has 0 number

Re: [R] Apply Function to Columns

2014-10-24 Thread Sarah
> Le 24 oct. 2014 à 09:23, Sarah a écrit : > > Thank you very much, it helped a lot! > > I just have another question know. I want to make plot for every species. I > just add the function « plot correlog » to the previous function and I have > now the following script: > > ddeg.correlog.li

Re: [R] Computing Water Balance using a loop.

2014-10-24 Thread Frederic Ntirenganya
Hi Mac, The first entry is 0 for water balance. That means the 3rd should be zero according to the formula. Water balance today = Water balance yesterday + Rainfall − Evaporation This loop gives 5 for each date. I don't see why ? May Rainfall Evaporation Water_Balance 1 70

Re: [R] Clarification on debug output

2014-10-24 Thread Prof Brian Ripley
On 24/10/2014 00:05, Mick Jordan wrote: I hope someone can explain what the #1 means (and for that matter the [2] in the debug output below. I can't find anything in the spec that explains what they mean. Thanks > f(1) debugging in: f(1) debugging in: f() debug at #1: { #1 is a 'srcref': se

Re: [R] dotplot with library lattice

2014-10-24 Thread Jim Lemon
On Thu, 23 Oct 2014 05:57:27 PM Matthias Weber wrote: > Hello together, > > i have a short question. Maybe anyone can help me to create a barplot in R > with the package lattice. > > I have the following data as ouput values and the following code: > > Data (d): > > KOST Budge

[R] Fine Tuning Parameters for LogReg in Caret

2014-10-24 Thread TJUN KIAT TEO
Is there a guide somewhere on how to set the tuning parameters for logistic regression in Caret ? Tjun Kiat [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.eth

Re: [R] how to calculate a numeric's digits count?

2014-10-24 Thread S Ellison
Dear Po Su, All floating point numbers in R have exactly the same number of binary digits (53) and therefore the same number of decimal digits (15.95, as decimals aren't represented exactly in binary). If you want to find out how many decimal digits are after the decimal point, you could try su

Re: [R] Computing Water Balance using a loop.

2014-10-24 Thread Frederic Ntirenganya
Thanks All, This is how I solved the problem and working correctly. ndays <- nrow(Wb30) for (iday in 2:ndays) { #Wb30$Water_Balance <- with( Wb30, cumsum(Water_Balance + Rainfall - Evaporation ) ) # Wb30$Water_Balance <- with( Wb30, cumsum(Wb30$Water_Balance[iday-1] + Wb30$Rainfall[i

Re: [R] how to calculate a numeric's digits count?

2014-10-24 Thread Duncan Murdoch
On 23/10/2014, 11:35 PM, PO SU wrote: > > Dear usRers, > Now i want to cal ,e.g. > cal(1.234) will get 3 > cal(1) will get 0 > cal(1.3045) will get 4 > But the difficult part is cal(1.3450) will get 4 not 3. > So, is there anyone happen to know the solution to this problem, or it can't >

Re: [R] Apply Function to Columns

2014-10-24 Thread Rui Barradas
Hello, Please cc the list, the odds of getting more and better answers are greater. And you should tell us from what package do the function plot.correlog comes. library(what)? As for your question, assuming you want to save your plots as PNG files, you could do something like the following.

[R] RE : Re: Apply Function to Columns

2014-10-24 Thread Sarah Schmid
Hello !  Yes, I realized just after sending you the email that I didn't cc the list, so I sent it again just after that.  And thank you very much for your help, it works perfectly !  And the package I used was ncf. Sarah Message d'origine De : Rui Barradas Date : A : Sar

Re: [R] how to calculate a numeric's digits count?

2014-10-24 Thread David L Carlson
Where do these numbers come from? If they are calculated values, they are actually many decimal places longer than your examples. They are represented on your terminal with fewer decimals according to the setting of options("digits"). For example: > sqrt(2)*sqrt(2) [1] 2 > sqrt(2)*sqrt(2) ==

[R] Error: Line starting 'Package: tools ...' is malformed!

2014-10-24 Thread Mike Beddo
I'm building R-3.1.1 (64 bit) from source on AIX 7.1. It was going well until I hit this: xlc_r -q64 -Wl,-brtl -Wl,-G -Wl,-bexpall -Wl,-bnoentry -lc -L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x8000 -o tools.so

Re: [R] Error: Line starting 'Package: tools ...' is malformed!

2014-10-24 Thread Jeff Newmiller
Helpful tip: there is a Posting Guide that points out that there is an R-devel mailing list for this kind of question, among other useful advice. --- Jeff NewmillerThe . . Go Live...

Re: [R] Heatmap - strange horizontal lines

2014-10-24 Thread Jeff Newmiller
I don't use these functions often enough to know their idiosyncrasies, but they appear to treat zero like a NA, and your second file has lots of zeros. I suspect this is due to the default way the continuous act data are 'cut" excluding the left side of the bins. If you read the help files you m

[R] I cannot get files from this site

2014-10-24 Thread Alemu Tadesse
Dear r-help users, I have been trying to download files from this link ftp://ftp.bsrn.awi.de/tat/tat0100.dat.gz sinsce yesterday using download.file (which I use very often for such task) and unfortunately it did not work for me for this ftp site. I can manually download the files - but not with s

[R] Extra documentation not appearing

2014-10-24 Thread Dan Vatnik
Hi, I have loaded my first package to CRAN and I have noticed a documentation issue. When I install the package from CRAN, it installs a Windows binary since I am using a Windows machine. I have a PDF file in my doc folder. Originally, it was in the inst/doc/ folder but when I load the binary, the

[R] rgdal: Convert ESRI ArcGis geo database (gdb directory) to geojson, or shapefile map

2014-10-24 Thread Guido Biele
Hello, I have an ESRI ArGis geo database directory which I would like to convert to geojson or a shape file (or anything else that I can read into R). Unfortunately that does not work out of the box with rgdal, because it does not come with the fileGDB or openfileGDB driver. I could successfully

Re: [R] dotplot with library lattice

2014-10-24 Thread Matthias Weber
Hi Jim, thanks for your reply. Doesn't look very bad, but what I mean with "Budget 100", is the percentage of the process on the x-axis. As a example, the Budget for ""1120" is 23326.8. At the moment we have "0" as value for IST. In this case, the blue button should be stand at 100% (x-axis =

[R] Default Display of hist.Date with breaks="months"

2014-10-24 Thread Andrews, Chris
Hi all, The default display of random dates with breaks="months" is less than optimal. set.seed(20141024) random.dates <- as.Date("2001/1/1") + round(365*stats::runif(100)) hist(random.dates, "months") The 13 edges of the 12 bars are labelled "Dec",

[R] RCurl memory leak in getURL method

2014-10-24 Thread dotnet sql
Hi It looks like we have hit a bug in RCurl. The method getURL seems to be leaking memory. A simple test case to reproduce the bug is given here: >library(RCurl) >handle<-getCurlHandle() >range<-1:100 >for (r in range) {x<-getURL(url="news.google.com.au",curl=handle)} If I run this code, the mem

[R] "command not found" from system() call in GUI with proper PATH

2014-10-24 Thread Eric Archer - NOAA Federal
When running a system file from within R, I have just started to get a "command not found" error although my PATH seems to be properly set and I can run the same system file from the terminal. The program I am trying to run is 'fastsimcoal' and is in /usr/local/bin. I confirm this in the terminal

Re: [R] Fine Tuning Parameters for LogReg in Caret

2014-10-24 Thread Jia Xu
Hi, Tjun: You can use getModelInfo() function in caret to find more details for each model. On Fri, Oct 24, 2014 at 12:59 AM, TJUN KIAT TEO wrote: > Is there a guide somewhere on how to set the tuning parameters for > logistic regression in Caret ? > > > Tjun Kiat > > > > [[alternative

Re: [R] [R-SIG-Mac] "command not found" from system() call in GUI with proper PATH

2014-10-24 Thread Emma Sherratt
I had the same problem and Simon Urbanek replied to me with the following: It is, because Yosemite ignores PATH for processes started from a GUI application. You will see if you run system("echo $PATH") You have to use full paths in Yosemite for anything that is not on the "sanctioned" PATH -- or

[R] readChar maxing out at screen width when using gnu screen?

2014-10-24 Thread Thomas Nyberg
I am running: R version 3.1.1 (2014-07-10) -- "Sock it to Me" Platform: x86_64-unknown-linux-gnu (64-bit) It is an Amazon 64 Linux instance with the following version: 3.3.4-5.fc17.x86_64 I compiled R myself as well as the newest version of gnu screen. I create a file with a couple hundred

Re: [R] dotplot with library lattice

2014-10-24 Thread Jim Lemon
On Fri, 24 Oct 2014 12:49:39 PM Matthias Weber wrote: > > I want always to see the "Process" of the green button in dependence > of the blue button at 100%. Okay. mwdat<-read.table(text= "KOST BudgetIST 1060 -2.18 0 1080 91037.71

[R] Finding Sum

2014-10-24 Thread Hafizuddin Arshad
Hi, I really need help on this. I have this data set: structure(list(Year = c(1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1971L, 1972L, 1972L, 1972L, 1972L, 1972L, 1972L, 1973L, 1973L, 1973L, 1973L, 1973L, 1973L, 1973L, 1973L, 1973L, 1973L, 1974L, 1974L, 1974L, 1974L, 1974L, 1974L, 19

Re: [R] dotplot with library lattice

2014-10-24 Thread Richard M. Heiberger
## My interpretation is that KOST is a categorical budget code id, and ## not an amount of currency. This is based on both you and Jim using ## even spacing for the rows of the dotplot. Your first line of the ## email said barplot, so my example uses likert in the HH package ## which is built on

Re: [R] Finding Sum

2014-10-24 Thread Jeff Newmiller
Please post in plain text to avoid corruption of your message. Your data has duplicates in it... I don't get the numbers you provided, even if I remove the duplicates. See table(dta$Year,dta$Month) There are many ways to do this kind of calculation. One is to use the base R function aggregate(

Re: [R] how to build a heatmap like this

2014-10-24 Thread Jeff Newmiller
Your question is hard to follow (too much genetics jargon?), and because you posted using HTML instead of plain text your table (?) is corrupted also. You should read [1], [2], and might consider looking at Bioconductor [3]. [1] Posting Guide, mentioned at the bottom of this email [2] http://st