Displaying 20 results from an estimated 20000 matches similar to: "Understanding R's "Environment" concept"
2011 Feb 10
3
Finding length of unique numbers in a vector
Hello there, would you please look into my codes? Here I have following:
> set.seed(100)
> samp <- sample(c(1,-1,0), 20, replace=T); samp
[1] 1 1 -1 1 -1 -1 0 -1 -1 1 -1 0 1 -1 0 0 1 -1 -1 0
Here I want to calculate the length of each unique number for above vector.
How can I do that?
Thanks in advance
[[alternative HTML version deleted]]
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.skeleton() 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 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
2004 May 26
5
Windows XP and domain logon
Hello,
I have installed samba 3.0.2a as PDC and BDC, I am able to add windows xp to domain and have added all the registry patches to windows xp, but when it comes to domain logon on windows xp client, the behaviour is very erratic, sometimes I am able to logon to domain and sometimes the domain logon fails, we need to restart the xp machine and keep trying to the domain logon. The error we
2011 Jun 24
4
What does class "call" mean? How do I make class "formula" into a "call"?
I have a list called "tabs" that I would like to have the same structure as my list "eqSystem." The two look like they have the same format but they are different because when I look at their attributes, class(eqSystem[[1]]) is "call" but class(tabs[[1]]) is "formula". I want to have class(tabs[[1]]) as a call too. So what does "call" mean? And how
2011 Aug 03
2
limits on liniar model
Can I put limits on the lm() command? I only know that you can choose a
liniar model with or without an intercept, but can I put other limits on
the coefficients (for example- the intercept must be bigger than 1) ?
_________________________________________________________________
Walla! Mail - [1]Get your free unlimited mail today
References
1. http://www.walla.co.il/
2011 Feb 18
2
Samba Cross-Compilation Problem
Hi,
I want to cross-compile samba for arm-linux.
I have host machine: Red Had Enterprise Edition 5.0 and I am not able to cross compile it.
I tried 3-4 Versions of samba but in vain.
Can you guide me through compiling process.Which stable version of samba should i use?Step by step cross compilation process.OR
If you have binaries or package for samba which i can?directly?use ?at my arm machine.
2015 Sep 01
2
Do Frontends need to care about alignment?
Meant to add more text, but somehow the email got sent.
Could you explain why for some of these cases? If I set the right target
and only want to operate with the system C ABI, will LLVM not generate
correct code if I want to pay say structs to a system defined function?
I see clang specifying alignment, but I'm not sure why.
I want to understand beyond alignment and function ABI (which for
2011 May 12
3
assigning creating missing rows and values
I have a dataset where I have missing times (11:00 and 16:00). I would like
the outputs to include the missing time so that the final time vector looks
like "realt" and has the previous time's value. Ex. If meas at time 15:30 is
0.45, then the meas for time 16:00 will also be 0.45.
meas are the measurements and times are the times at which they were taken.
meas<-runif(18)
2010 Oct 18
1
Basic structure operations doubt
I'm doing these manipulations on the data frame and wondering why does R
have to remember historical data on my operation and not just keep the
needed info.
Probably a basic fundamentals of the way R handles data .. Pls point me to
the manual if possible ..
I have this Index data:
> head(NIFTY_INDX)
Constituents.list.of.S.P.CNX.Nifty X X.1
X.2 X.3
2011 Oct 11
2
replicate data.frame n times
Hi,
is there a way to replicate a data.frame like you can replicate the entries of a vector (with the repeat-function)?
I want to do this:
x <- data.frame(x, x)
(where x is a data.frame).
but n times.
And it should be as cpu / memory efficient as possible, since n is pretty big in my case.
thanks for any suggestions!
2011 Aug 26
2
Extracting values in table
Hi All,
I am a beginner in programming in r and please do forgive me if my question
seems to be silly and sometimes not understandable.
1. we have a list of elements in a list say:
ls<-list("N","E","E","N","P","E","M","Q","E","M")
2. We have an another list of tables in a list say:
n <-
2011 Jul 14
5
Adding rows based on column value
Dear all,
I have one problem and did not find any solution.(I have also attached the problem in text file because sometimes column spacing is not good in mail)
I have a file(file.txt) attached with this mail.I am reading it using this code to make a data frame (file)-
file=read.table("file.txt",fill=T,colClasses = "character",header=T)
file looks like this-
Chr Pos
2011 May 12
2
Row names and matrixs
Hi all -
I am NEW to R and NEW to any type of programming. I am making heatmaps
using the heatmap.2 function within gplots package. At present, when the
heatmap is plotted it uses the row identifiers as 1,2,3,4...etc. However, I
much rather use my own labels. I was told my another well-versed R
programmer to use the follow script:
x<-as.matrix(test1[,-1]) ## skip column 1
rownames(x)<-
2011 Jun 28
4
how to print "<=" in plot title
Hi, how can I print "<=" (I mean the symbol of just one character) in the main
title of a plot?
for example:
plot(1:10, main=paste("x <=", x))
where variable x is some number generated on the fly.
Thanks
John