similar to: Drop single-dimensional array

Displaying 20 results from an estimated 6000 matches similar to: "Drop single-dimensional array"

2011 May 26
1
Statistical mode
One descriptive statistic that is conspicuously missing from core R is the statistical mode - the most frequent value in a discrete distribution. I would like to propose adding the attached 'statmode' (or a similar function) to the 'stats' package. Currently, it can be quite cumbersome to calculate the mode of a distribution in R, both for experts and beginners. The lack of a
2020 Apr 20
1
stringsAsFactors and type.convert()
Dear Martin, Thank you for the well-reasoned response. I realized I was rather late to make this suggestion for 4.0.0, changing a somewhat low-level function that can indeed affect packages. I was just reviewing some R user scripts that were using type.convert(), mainly on data frames. In all cases, people were passing as.is=TRUE, so I was reminded that I would not be the only user who would
2020 Apr 13
2
stringsAsFactors and type.convert()
If read.table() is defaulting to "character" instead of "factor" data type, shouldn't type.convert() also default to "character" in R 4.0.0? This would seem like a good time to change the default to type.convert(as.is=TRUE), to align it with the new default in read.table and data.frame. I think many R >=4.0.0 users would be happy with as.is=TRUE as the default
2003 Feb 21
1
POSIX problem in New Zealand (PR#2570)
Full_Name: Arni Magnusson Version: 1.6.2 OS: Windows XP Submission from: (NULL) (210.48.49.68) Hi there. I'm experiencing unexpected behaviour from as.POSIXct: > as.POSIXct("1969-12-24") [1] "1969-12-23 23:00:00 New Zealand Standard Time" > as.POSIXlt("1969-12-24") [1] "1969-12-24" > as.POSIXlt("1969-12-24")+1 [1] "1969-12-23
2003 Sep 18
1
Reverse axis in xyplot()
Creating a plot with reverse Y axis is easy enough with traditional graphics: > x <- 1:3 > y <- 1:3 > plot(y~x, ylim=c(3,1)) +-----------+ 1 | o | | | 2 | o | | | 3 | o | +-----------+ 1 2 3 But xyplot doesn't grasp my idea: > xyplot(y~x, ylim=c(3,1)) +-----------+ 3 | o | | | 2 | o |
2014 Apr 15
1
ASCIIfy() - a proposal for package:tools
Hi all, I would like to propose the attached function ASCIIfy() to be added to the 'tools' package. Non-ASCII characters in character vectors can be problematic for R packages, but sometimes they cannot be avoided. To make packages portable and build without 'R CMD check' warnings, my solution has been to convert problematic characters in functions and datasets to escaped
2010 Feb 11
1
Rounding multinomial proportions
I present you with a function that solves a problem that has bugged me for many years. I think the problem may be general enough to at least consider adding this function, or a revamped version of it, to the 'stats' package, with the other multinomial functions reside. I'm using R to export data to text files, which are input data for an external model written in C++. Parts of the
2009 May 06
1
changing variables in a dataset
Hi! I just quasi-learned how to use R and I'm trying to change the feed from horsebean, linseed, etc to 1, 2, 3, etc The dataset I'm practicing on is pre-loaded in R data(chickwts) chickwts Any help is much appreciated!! Thank you!! -- View this message in context: http://www.nabble.com/changing-variables-in-a-dataset-tp23407765p23407765.html Sent from the R help mailing list archive
2010 Mar 25
1
update.packages(1)
I'm relaying a question from my institute's sysadmin: Would it be possible to modify update.packages() and related functions so that 'lib.loc' accepts integer values to specify a library from the .libPaths() vector? Many Linux users want to update all user packages (inside the R_LIBS_USER directory, e.g. ~/r/library) and none of the system packages (inside the /usr directory,
2010 Jun 07
1
Source of chickwts data
I'm not sure if this is the right mailing list. My apologies if I'm sending the question to the wrong mailing list. (The r-packages list moderator suggested using the R-help list.) My question is about the "chickwts" data in the datasets package. According to help(chickwts), the source of the data is ?Anonymous (1948) Biometrika, 35, 214. But this reference seems irrelevant.
2005 Feb 02
4
(no subject)
can you recommend a good manual for R that starts with a data set and gives demonstrations on what can be done using R? I downloadedR Langauage definition and An introduction to R but haven't found them overly useful. I'd really like to be able to follow some tutorials using a dataset or many datasets. The datasets I have available on R are Data sets in package 'datasets':
2003 Dec 09
1
arni.colors
Dear r-devel, I have implemented a function to create color palettes with improved contrast and logical order, compared with the built-in ones: source("arni.colors.R") # code is given below barplot(rep(1,100), col=arni.colors(100), space=0, border=0, axes=F) par(mfrow=c(2,1)) # rainbow() has too much green... barplot(rep(1,50), col=rev(rainbow(50,end=0.7)), space=0, border=0,
2011 Mar 16
1
Autocorrelation in linear models
I have been reading about autocorrelation in linear models over the last couple of days, and I have to say the more I read, the more confused I get. Beyond confusion lies enlightenment, so I'm tempted to ask R-Help for guidance. Most authors are mainly worried about autocorrelation in the residuals, but some authors are also worried about autocorrelation within Y and within X vectors
2003 Aug 20
1
Five functions proposed for base
Dear r-devel, Among the R functions I have written and later shared with colleagues, there are five that I hope will become a part of the R base package. The tasks are neither specific nor marginal, so rather than creating one more 'misc' package, I would be happy if the R Development Core Team would adopt these functions and hammer them into shape. The functions are available from
2003 Feb 13
2
legend
I think I'm missing something tonight in the usage of 'legend': plot(0, type="n") legend(locator(1), month.abb[1:5], pch=15, col=1:5) gives me something similar to what I want. But legend(locator(1), month.abb[1:5], fill=T, col=1:5) gives me 5 black boxes. What am I doing wrong? Thank you, > version _ platform i686-pc-linux-gnu arch i686 os
1999 Nov 26
4
Programming ....
Hi, I am building my own TCP daemon for easing some routine admin stuff... I am no expert on security,. I would really appreciate it if someone sent me some pointers to writing TCP daemons that are hacker-proof( i know there is nothing like that...but I do not want to be making mistakes in coding that are well known.. ;) The daemon runs as root....so that is why I am woried.... Thx, Arni
2010 Feb 15
1
Difference in Levene's test between R and SPSS
Hello, I notice that when I do Levene's test to test equality of variances across levels of a factor, I get different answers in R and SPSS 16. e.g.: For the chickwts data, in R, levene.test(weight, feed) gives F=0.7493, p=0.5896. SPSS 16 gives F=0.987, p=0.432 Why this difference? Which one should I believe? (I would like to believe R :) Ravi -- View this message in context:
2005 Sep 07
2
Month recognition issue
Dear all, I am running R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 Under Mac os X, a french version! I am preparing a package and I got the following issue I am trying to read dates that are written in english and have them recognized by R using as.Date function. I realized strangely that when I type > month.abb [1]
2020 Apr 20
0
stringsAsFactors and type.convert()
>>>>> Arni Magnusson >>>>> on Mon, 13 Apr 2020 22:20:19 +0000 writes: > If read.table() is defaulting to "character" instead of "factor" data type, shouldn't type.convert() also default to "character" in R 4.0.0? > This would seem like a good time to change the default to type.convert(as.is=TRUE), to align it with
2009 Jul 09
1
merge performace degradation in 2.9.1
I have noticed a significant performance degradation using merge in 2.9.1 relative to 2.8.1. Here is what I observed: N <- 100000 X <- data.frame(group=rep(12:1, each=N), mon=rep(rev(month.abb), each=N)) X$mon <- as.character(X$mon) Y <- data.frame(mon=month.abb, letter=letters[1:12]) Y$mon <- as.character(Y$mon) Z <- cbind(Y, group=1:12) system.time(Out