similar to: Finding length of unique numbers in a vector

Displaying 20 results from an estimated 2000 matches similar to: "Finding length of unique numbers in a vector"

2011 Jul 18
4
Understanding R's "Environment" concept
Hi all, I am trying to understand the R's "environment" concept however the underlying help files look quite technical to me. Can experts here provide me some more intuitive ideas behind this concept like, why it is there, what exactly it is doing in R's architecture etc.? I mainly need some non-technical intuitive explanation. Thanks,
2011 Jul 18
4
Understanding R's "Environment" concept
Hi all, I am trying to understand the R's "environment" concept however the underlying help files look quite technical to me. Can experts here provide me some more intuitive ideas behind this concept like, why it is there, what exactly it is doing in R's architecture etc.? I mainly need some non-technical intuitive explanation. Thanks,
2011 Feb 19
2
Seeking help in Package development
Dear all, I am a new user of R and currently trying hard to develop my own package. Here I am following this tutorial 'http://www.mathfinance.cn/how-to-create-an-R-package-in-windows/' Here it says that (step 8): "open a ?command prompt? window, change the directory to where your package is, type the command ?R CMD build MonteCarloPi? to build the package, this will generate a file
2011 Jul 08
2
Selecting subset of a given vector
Hi there, given a numeric vector, I can select numbers within a specific range. However presently, I have something related but different problem. Suppose I have a numeric vector. Now take an arbitrary number. Goal to to chose a specific subset with a given length, from that given vector, so that those chosen numbers are centered around that given constant. Here is one example: ### My original
2011 Mar 06
1
Writing Rd files
Hi all, I have created a package and now into writing it's help files. However I am having problem on, how to put a 'new line' in any statement of the help file? For example please consider following: \title{ This is a new function and this function will calculate the mean. } However I want to write it is this way: \title{ This is a new function & and, this function will
2011 Jun 09
1
package.sk​eleton() does not create 'data' folder
Hi again, yesterday I mailed this query however I could not see this on the mail list. Therefore, I am reposting it again. I was using package.skeleton() function to create the skeleton of my package in windows. Here is my attempt: rm(list = ls()) setwd("F:/R_PackageBuild") package.skeleton("trial1", namespace = TRUE, code_files = "F:/R_PackageBuild/trial.r") In
2011 Feb 09
2
A question on Duplicating
Hello I am struggling to accomplice an idea which is as follows: I have a vector say: a <- c("a", "b", "c", "a") and another: b <- c("m", "n", "o", "m"). Length of those 2 vectors are essentially be same. Here task is to check the duplicates in the vector 'a' and then to check whether any duplicates are
2011 Feb 27
1
Database abstraction
Hi all - I've been working on a lite ORM and database abstraction package for R. Formatting complex queries by hand has always been an error-prone hassle, so I've tried to do away with that as much as possible, instead, using R objects to represent elements of a database system (statements, clauses, operators, functions, fields, tables, etc.). R5 classes have made the development of this
2011 Jun 10
1
How to add a welcome message in Package development?
Dear all, it is my first post in R-devel list, and hope that this is the right place to ask question related to package development. I have created my first package in Windows through the usual route. Now I want to add some ***Welcome message*** as soon as user loads my package into their R console, using library() function. However I could not figure out where and how should I add this
2011 Jul 14
1
Creating package Vignette
Hi all, I was trying to create some vignette files for my newly developed package, however wondering whether there could be any simpler way to do so. In writing R extension it is advised to go through Sweave route, however I have already got a big pdf file and want to use this as package vignette. So far I have manually created the inst/doc folder in the main package skeleton, and put that file
2011 Mar 17
3
Beginner question: How to replace part of a filename in read.csv?
I would like to use samp as a part of a filename that I can change. My source files are .csv files with date as the file name, and I would like to be able to type in the date (later perhaps automate this using list.files) and then read the csv and write the pdf automatically. I have tried different combinations with "" and () around samp, but I keep getting the error "object
2011 Sep 06
2
Generalizing call to function
Hello guys, I would like to ask for help to understand what is going on in "func2". My plan is to generalize "func1", so that are expected same results in "func2" as in "func1". Executing "func1" returns... 0.25 with absolute error < 8.4e-05 But for "func2" I get... Error in dpois(1, 0.1, 23.3065168689948, 0.000429064542600244,
2012 Sep 20
3
lattice dotplot reorder contiguous levels
my reproducible example test<-structure(list(site = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L), .Label = c("A", "B", "C", "D", "E"), class = "factor"),
2009 Feb 24
2
lmer, estimation of p-values and mcmcsamp
(To the list moderator: I just subscribed to the list. Apologies for not having done so longer before trying to post.) Hi all, I am currently using lmer to analyze data from an experiment with a single fixed factor (treatment, 6 levels) and a single random factor (block). I've been trying to follow the online guidance for estimating p-values for parameter estimates on these and other
2000 Feb 24
2
(-1 as index) OR (envelope for QQ)
I'm new to R (and to S) and am wondering about code from pages 72 and 83 of MASS (Venables+Ripley, 3rd edition), to draw an envelope on a QQ plot. Copying from the book, I've got: #... code whose gist is "a.fit <- nls(..." num.points <- length(resid(a.fit)) qqnorm(residuals(a.fit)) # illustrate data-model residuals qqline(residuals(a.fit)) samp <-
2004 Mar 01
6
How to plot Histogram with frequence overlaid by distribution curve
Hi, I am facing the problem that I want to plot a histogram chart set freq to true and overlay with normal or weibull or exponential distribution curve. The sample code is shown as below: >samp<-c(-8.2262,-8.2262,-8.2262,-8.20209,-8.09294,-8.07321,-8.07321, -8.07321,-8.07175,-8.04948,-8.04948,-8.04948,-8.03848,-8.03848,
2007 Feb 12
1
lmer and estimation of p-values: error with mcmcpvalue()
Dear all, I am currently analyzing count data from a hierarchical design, and I?ve tried to follow the suggestions for a correct estimation of p-values as discusssed at R-Wiki (http://wiki.r-project.org/rwiki/doku.php?id=guides:lmer-tests&s=lme%20and%20aov). However, I have the problem that my model only consists of parameters with just 1 d.f. (intercepts, slopes), so that the
2007 Mar 12
2
Lmer Mcmc Summary and p values
Dear R users I am trying to obtain p-values for (quasi)poisson lmer models, including Markov-chain Monte Carlo sampling and the command summary. > > My problems is that p values derived from both these methods are totally different. My question is (1) there a bug in my code and > (2) How can I proceed, left with these uncertainties in the estimations of > the p-values? > > Below
2010 Oct 10
1
Query about .check_packages_used_in_examples
G'day all, looking at http://cran.at.r-project.org/web/checks/check_results_Sleuth2.html I noticed that r-prerel-* and r-devel-* issue notes. Apparently, now examples are more thoroughly checked by R CMD check and the note pointed out that a package used in the examples was not declared. This was easily fixed by adding 'Suggests: lattice' to the DESCRIPTION file (now this change has
2017 Nov 12
0
create waveform sawtooth
Ccing the maintainer if the tuneR package. Looks to me like sawtooth (and square) don't behave as expected when using xunit="samples". Workaround is to use xunit="time" instead: sawtooth(110,duration=1/100,samp.rate=sample_rate,xunit="time") I looked at the code but found it to be opaque. -- Sent from my phone. Please excuse my brevity. On November 12, 2017