similar to: NULL or NA for missing function arguments?

Displaying 20 results from an estimated 400 matches similar to: "NULL or NA for missing function arguments?"

2006 Apr 12
0
headerfile translation to Delphi (Pascal) completed
Hi, I am happy to announce that I finished the translation of almost all LGPL'ed R headerfiles to Delphi. As a test I did several demos which basically contain delphized versions of all the examples of chapter 5 in "Writing R Extensions". Please have a look in the attachments for details (DemosAndHeaders.txt), more information (Readme.txt) and an example of how it looks
2006 Apr 25
1
protection needed?
Dear list, I am unsure if I really need to protect a coerced object if I immediately access its value and don't access the object anymore. I tried to find out by looking into the R sources but didn't find something similar. It's about the variable _skipLines in the call "function ReadXls( _file, _sheet, _type, _header, _colHeader, _skipLines: pSExp ): pSExp; cdecl;". I
2005 Jun 03
3
plots from batchfile on windows
Hi, On windows I'd like to run a batchfile that leaves me a plot. As a test I have the scriptfile "test.r" which only contains: x <- 1:10; y <- sample( 10 ) plot( x, y ) Now I tried the following (but nothing worked): a) "R --vanilla < test.r" in the cmd window, => that doesn't give me a plot b) the same, but I added
2006 Nov 28
3
delete content of directory - unlink doesn't work as expected
Hi, I try to delete the files in a directory. While the command invisible(lapply( list.files( "DeleteThis" ), function(x) file.remove(paste("DeleteThis", x, sep="/" )) )) works, I keep thinking that there should be a more direct command. "unlink" looks like a good candidate but whith this I only arrive to either delete the whole directory or nothing
2005 Jul 05
1
Kind of 2 dim histogram - levelplot
Dear R-List, I've written some code to put measurement values at a position x and y in bins (xb and yb). It works, but I wonder if there isn't a function that would do what I do by hand in "# fill data in bins"? Here is the code: # data x <- c( 1.1, 1.5, 2.3, 2.5, 2.6, 2.9, 3.3, 3.5 ) y <- c( 6.3, 6.2, 5.9, 5.3, 5.4, 4.2, 4.8, 4.6 ) val <- c( 50, 58, 32, 14, 12,
2005 Oct 13
3
aggregate slow with many rows - alternative?
Hi, I use the code below to aggregate / cnt my test data. It works fine, but the problem is with my real data (33'000 rows) where the function is really slow (nothing happened in half an hour). Does anybody know of other functions that I could use? Thanks, Hans-Peter -------------- dat <- data.frame( Datum = c( 32586, 32587, 32587, 32625, 32656, 32656, 32656, 32672, 32672, 32699 ),
2006 Feb 16
3
Rf_errorcall - translate to Pascal
Hello! I (try to) convert the external R header files to Pascal (Delphi). At one place I stumbled over a macro that uses a method that is not declared in a LGPL header file: In Rinternals.h: #define error_return(msg) { Rf_error(msg); return R_NilValue; } #define errorcall_return(cl,msg){ Rf_errorcall(cl, msg); return R_NilValue; } ~~~~~~~~
2007 Oct 27
3
How to make own function load automatically on startup
Dear list members, I have written a function, called say Analysis. I supply an Excel file name as an argument, it does analysis on this file and returns a pdf file with specific plots, and a text file with several statistical models' output (I extract certain values from the output and create my own custom dataframe with output). As of now I have to open the script file and load the function
2006 Jun 19
2
strange digit switching
Hi, I execute the following code snippet.What I don't understand is, that in the first two cases the numbers shown don't correnspondant to the input (though I have set the options to show 22 digits). When I assign the third number which has one place, the display of the numbers is suddenly correct. Can anybody explain what happens here? (this is just a sample, my real problem lies in
2005 Jun 09
3
dir() and RegEx and gsub()
Dear R-Users, I have two questions: a) in a directory there are 3 files: [1] "Data.~csv" "Kopie von Data.~csv" "VorlageTradefile.csv" The command "dir( fold, pattern = "\.csv" )" gives back *all* the 3 files With dir( fold, pattern = "\\.csv" ) I get back only VorlageTradefile.csv. I don't understand this behaviour,
2019 Jun 20
2
base::format adds extraneous whitespace for some inputs
Dear R Core Team, First of all, thank you for your amazing work on developing and maintaining this wonderful language. I just stumbled upon the following behavior in R version 3.6.0: format(9.91, digits = 2, nsmall = 2) format(9.99, digits = 2, nsmall = 2) yield "9.91" and " 9.99" with an extraneous whitespace. My expected output for the second command is
2006 Feb 14
1
weird behavior of nsmall in format
>From the help page of format, nsmall should control the number of digits. > format(0.123456789, nsmall = 10) [1] "0.1234567890" > format(0.123456789, nsmall = 1) [1] "0.1234568" > format(0.123456789, nsmall = 2) [1] "0.1234568" > format(0.123456789, nsmall = 8) [1] "0.12345679" It adds zeros fine but for
2019 Jun 20
0
base::format adds extraneous whitespace for some inputs
I can reproduce this. It has to do with whether the value rounds down to 9 or up to 10, and thus needs another space, I think. I agree that it shouldn't happen, but at least you can get rid of the space by using trim = TRUE. # rounds to 9 vs 10 format(9.95, digits = 2) format(9.96, digits = 2) format(9.95, digits = 2, nsmall = 2) format(9.96, digits = 2, nsmall = 2) format(9.95, digits =
2006 Jun 09
4
HTML nsmall vector format problem
Hello All I am having a bit of trouble formatting my HTML with the desired number of digits after the decimal place. Am I doing something wrong/misunderstanding or is it a bug? Looking at the example supplied with ?HTML.data.frame: HTML(iris[1:2,1:2],nsmall=c(3,1),file="") Gives html output that includes the lines: </tr> <tr><td
2011 Feb 26
2
how to remove rows in which 2 or more observations are smaller than a given threshold?
Hello The data set I am examining has 7425 observations (rows with unique identifiers) and 46 samples(columns). I have been trying to generate a dataset that filters out observations that are "negligible" The definition of "negligible" is absolute value less or equal to 1.58. The rule that I would like to adopt to create a new data is: drop rows in which 2 or more
2001 Sep 25
2
glm.nb, anova.negbin
Dear R-collegues, I'm getting an error message (Error in round) when summarising a glm.nb model, and when using anova.negbin (in R 1.3.1 for windows): > m.nb <- glm.nb(tax ~ areal) > m.bn Call: glm.nb(formula = tax ~ areal, init.theta = 5.08829537115498, link = log) Coefficients: (Intercept) areal 3.03146 0.03182 Degrees of Freedom: 283 Total (i.e. Null); 282
2007 Mar 09
6
R and clinical studies
Does anyone know if for clinical studies the FDA would accept statistical analyses performed with R ? Delphine Fontaine
2007 Jun 08
2
legend + expression
Dear all; A simple? question. I'm having a problem with a math expression in the legend of a plot and I haven't found the way to get this to work, so any help will be appreciate. Basically I want to include in the plot is the R-squared and its numerical value, so I tried this: R2c<-0.82879 # R-squared of calibration model plot(1:10,1:10) legend("topleft",
2009 May 20
2
round function seems to produce maximum 2 decimals
I am trying to use round()to force R to display a specific number of decimals, but it seems to display <=2 decimals no matter what I specify in the digits argument. As an alternative I tried signif(), but it also produces unexpected results. See example code and results below. Format() works, but then the result no longer is numeric. Am I missing something simple? I am using R 2.9.0 on Windows
2004 Mar 03
3
Adding text (coefts) to pairs panels
Hi, First of all, thanks for the efforts of all the developers and contributors - I'm very new to R and at the moment am just using it to create some graphics, but it seems to be quite powerful. I've googled the archives and wasn't able to find anyhting that dealt with this problem, so would appreciate any suggestions/tips. In a pairs plot I'd like to plot a linear regression line