similar to: How to represent pure linefeeds chr(10) under R for Windows

Displaying 20 results from an estimated 7000 matches similar to: "How to represent pure linefeeds chr(10) under R for Windows"

2003 Nov 06
2
Summary: How to represent pure linefeeds chr(10) under R for Windows
Thanks to all who have responded. My concern was to be able to write a csv file that can have line feeds in string columns chr(10). Why? Excel allows line feeds chr(10) within cells and line breaks chr(13)+chr(10) at line ending, but the windows version of R automatically replaces \n by \r\n in writing and \r\n by \n in reading (text mode). The clues for a solution came from Brian Ripley and
2009 Sep 18
4
basename returns "." not in filename (PR#13958)
Full_Name: Jens Oehlschl?gel Version: 2.9.2 OS: Win32 Submission from: (NULL) (85.181.152.156) # Obviously an empty basename is allowed (if the filepath is a pure path) > basename("/") [1] "" # but here we get the dot from the path > basename("./") [1] "." > version _ platform i386-pc-mingw32
2009 Nov 15
3
file.rename overwrites existing target (PR#14065)
Full_Name: Jens Oehlschl?gel Version: 2.10.0 OS: Windows XP Professional Submission from: (NULL) (85.181.158.112) file.rename() will successfully rename file a to b - even if b exists already. Though the documentation does not state what file.rename() will do in this case, I guess the expected behaviour is to fail and return FALSE. Kind regards Jens Oehlschl?gel > cat("a\n",
2020 Jun 26
2
Error in substring: invalid multibyte string
Hi all, I'm getting the following error from substring: > substr("<I>Jens Oehlschl\xe4gel-Akiyoshi", 1, 100) Error in substr("<I>Jens Oehlschl\xe4gel-Akiyoshi", 1, 100) : invalid multibyte string at '<e4>gel-A<6b>iyoshi' Is that normal / intended? I've tried setting the Encoding/locale to Latin-1/UTF-8 but that does not help. nchar
2004 May 13
1
please help with estimation of true correlations andreliabilities
Dear John, Dear Joseph, Thank you for your quick answers and the pointer to semnet. I try to clarify on my assumptions: - yes, I am willing to assume multivariate normality - no, I don't want to assume a single factor model - I assume there is an unknown number of factors, and I do not know which items belong to which factors but I still want to estimate single item reliabilities Is this
2003 Oct 31
2
How to grow an R object from C (.Call Interface)
What is the best way to grow an R return object in writing a C function using the Rdefines.h macros. In my application, the final size of the return object is not known during construction. My understanding is that each time I grow an R object I have to use PROTECT() again, probably before UNPROTECTing the smaller version. However, due to the stack character of the PROTECT mechanism, UNPROTECT
2020 Jun 27
1
Error in substring: invalid multibyte string
Thanks for the quick response Ivan. readLines with encoding='latin1' works for me (on Ubuntu). However I was more concerned with the inconsistency in results between substr and regexpr. I was expecting that if one of them errors because of an unknown encoding then the other should as well. Even better, if regexpr works, why shouldn't substr work as well? Incidentally the analogous
2007 Nov 13
5
How to overload the assignment operator?
Dear all, what is the proper way to make the assignment operator generic and define methods depending on the class of the assigned value? Best regards Jens Oehlschl?gel P.S. I vaguely remember that this was possible in S+. In R I tried to no avail: # using this like h<-1:3 gives Error: in `<-.default`(h, 1:3) : invalid (do_set) left-hand side to assignment
2000 Jul 27
3
R under Win2000?
Dear all, Will R run under Win2000 or is it safer to stay with NT4.0 for a while? Regards -- Dr. Jens Oehlschl?gel Analyse BBDO InterOne Gr?nstr. 15 40212 D?sseldorf Tel.: +49 (0)211 1379-187 Fax.: +49 (0)211 1379-461 http://www.bbdo-interone.de -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2002 Jun 24
1
problems with assigning a class to an environment
I was surprised to find that calling str() on an environment can remove attributes from it, as in > a <- new.env() > class(a) <- "jens" > class(a) [1] "jens" > str(a) Class 'jens' length 0 <environment> > class(a) NULL then I found in the R-Language-Manual in chapter 2.1.10 Environments the sentence: "In particular, assigning
2003 Nov 18
1
How to return a big treelike list from .Call Interface (protect stack overflow)
I try to create a big treelike list structure using the RDefines/RInternal macros. The tree carries information at each node (attribute list) and at each leaf (vector). My understanding is that for each node I add to the binary tree I have to call PROTECT(newnode = NEW_LIST(2)); and cannot UNPROTECT before I return the whole tree. Same story for node attributes and leaf vectors. However, this
2004 May 13
2
please help with estimation of true correlations and reliabilities
Can someone point me to literature and/or R software to solve the following problem: Assume n true scores t measured as x with uncorrelated errors e , i.e. x = t + e and assume each true score to a have a certain amount of correlation with some of the other true scores. The correlation matrix cx of x will have its off-diagonal entries reduced by measurement error compared to the true
2003 Oct 23
2
GIS re-mapping / polygon overlap
In Germany the Unemployment Agency uses a sectioning of the german map that is different from the usual Administrative Boundaries. Some demographic data are available in Administrative Boundaries only, some in Unemployment Boundaries only. I would like to generate estimates in one boundary system of data availabe in the other boundary system, and would appreciate advice concerning the following
2016 Sep 27
2
problem in levels<- and other inconsistencies
# A couple of years ago # I helped making R's character NA handling more consistent # Today I report an issue with R's factor NA handling # The core problem is that # levels(g) <- levels(g) # can change the levels of g # more details below # Kind regards # Jens Oehlschl?gel # Say I have an NA element in a vector or list x <- c("a","b",NA) # then using split()
2004 Feb 27
2
Is there a way to deactivate partial matching in R?
Dear R-experts, I just tracked down a nasty bug in a dynamically parametrized function to wrong argument matching. As we get more and more complex applications build on top of R (like bioconductor) partial matching gets more and more dangerous. I would like to deactivate partial matching in R (partial argument matching as well as partial matching of list elements), e.g. using an environment
2004 Feb 27
2
Is there a way to deactivate partial matching in R?
Dear R-experts, I just tracked down a nasty bug in a dynamically parametrized function to wrong argument matching. As we get more and more complex applications build on top of R (like bioconductor) partial matching gets more and more dangerous. I would like to deactivate partial matching in R (partial argument matching as well as partial matching of list elements), e.g. using an environment
2009 Dec 28
2
Ops method does not dispatch on either of two classes
I have defined boolean methods for bit and bitwhich objects, for example |.bit <- function(e1,e2) and |.bitwhich <- function(e1,e2) Both methods coerce their arguments to the respective class, however if I do something like bit_obj | bitwhich_obj then I get a warning Warning message: Incompatible methods ("|.bit", "|.bitwhich") for "|" and none of the
2007 Jul 13
2
nearest correlation to polychoric
Dear all, Has someone implemented in R (or any other language) Knol DL, ten Berge JMF. Least-squares approximation of an improper correlation matrix by a proper one. Psychometrika, 1989, 54, 53-61. or any other similar algorithm? Best regards Jens Oehlschl?gel Background: I want to factanal() matrices of polychoric correlations which have negative eigenvalue. I coded Highham 2002
2017 Jun 16
3
'ordered' destroyed to 'factor'
Dear all, ? I don't know if you consider this a bug or feature, but it breaks reasonable code: 'unlist' and 'sapply' convert 'ordered' to 'factor' even if all levels are equal. Here is a simple example: o <- ordered(letters) o[[1]] lapply(o, min)[[1]]??????????# ordered factor unlist(lapply(o, min))[[1]]? # no longer ordered sapply(o, min)[[1]]??????????# no
2009 Oct 01
2
(no subject)
Hi, Does anyone know where the following package is available: Holleczek B, Gondos A, Brenner H. PeriodR - an R package to calculate long term survival estimates using period analysis. Methods of Information in Medicine 2009; 48: 123-128. Thanks Jens Oehlschl?gel -- GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT!