Displaying 20 results from an estimated 2000 matches similar to: "How to call subset in a for loop?"
2012 Jan 12
2
using "list=" to force evaluation before execution
Dear all,
I have noticed that the expression 'list =' is sometimes used to tell R to
evaluate something before executing it.
Two examples:
rm(list=ls())
a = 3
myVarName = 'a'
save(list=myVarName, file=...)
I was wondering whether there is any documentation on this way of using
"list". Which is a clearly different use than what ?list talks about, as
the latter
2011 Jan 27
1
Increasing grayscale value in scatter plot with number of points on particular location
Dear all,
When making a plot with the command plot(xVector, yVector), there are many
points that collide on the same place in the plot. In order to make this
plot clearer, I have been looking for a way to colour the points based on
the number of points that fall onto each other. If only one point falls on a
particular location, make it gray, if many points fall, make it black.
I tried to search
2011 Jun 29
1
Tell emacs to load new R version
Dear,
How do I tell Emacs to update to the new R version I installed? It still
loads the old R version. I already updated the the system path, but that
didn't seem to work.
Thanks for your help,
Aditya
--
Aditya Bhagwat
[[alternative HTML version deleted]]
2007 Dec 03
3
Request param type of array
Hello.
I have tested such form:
<form method=''POST''>
<input type=''hidden'' name=''myfield'' value=''value1''>
<input type=''hidden'' name=''myfield'' value=''value2''>
<input type=''submit'' name=''_submit''
2006 Aug 11
5
actionmailler corrupting emails
Hi All,
I have a problem with actionmailer corrupting my html emails. It is
adding the character ''3D'' before any quotes (single or double) in my
source and smattering ''='' characters throughout as well. Very
strange. Here''s an example from one of the emails:
________________
<body>
<div id=3D''wrapper''>
<div
2012 Jun 19
1
Reference classes and memory consumption
Dear All,
It seems that reference classes consume a lot of memory which became a problem for my rather extensive simulation.
I prepared a small example. An instance of this minimal class uses about 20K on disk.
rm(list=ls(all=TRUE));
MySmallClass = setRefClass("MySmallClass",
fields = list(
myField = "numeric"
),
methods = list(
initialize =
2007 Dec 03
3
Please solve my query
hi
my question is
Start a POP3 server on rhel5 with a matching criteria
1) user jack must get mail
2 Allow your network lw.com
3)my133.org domain can not access your server
Thanks And Regards
Bhagwat Swarup
NH India Ltd
2006 May 08
17
partial problem
def my_controller
@variable = [{''myfield''=>''grey''},{''myfield''=>''blue''}]
end
#-------------------------my_view
<table>
<%= render :partial=>''my_partial, :collection=>@variable %>
</table>
#----------------------_my_partial
<tr>
<td><%=
2010 Jun 23
2
About normality tests...
Hi all,
I have two very large samples of data (10000+ data points) and would
like to perform normality tests on it. I know that p < .05 means that
a data set is considered as not normal with any of the two tests. I am
also aware that large samples tend to lead more likely to normal
results (Andy Field, 2005).
I have a few questions to ensure that I am using them right.
1) The Shapiro-Wilk
2009 Jan 20
5
Problem with subset() function?
Hi all,
Can anyone explain why the following use of
the subset() function produces a different
outcome than the use of the "[" extractor?
The subset() function as used in
density(subset(mydf, ht >= 150.0 & wt <= 150.0, select = c(age)))
appears to me from documentation to be equivalent to
density(mydf[mydf$ht >= 150.0 & mydf$wt <= 150.0, "age"])
2017 Sep 25
2
Subset
myDF <- data.frame(a = c("<0.1", NA, 0.3, 5, "Nil"),
b = c("<0.1", 1, 0.3, 5, "Nil"),
stringsAsFactors = FALSE)
# you can subset the b-column in several ways
myDF[ , 2]
myDF[ , "b"]
myDF$b
# using the column, you make a logical vector
! is.na(as.numeric(myDF$b))
# This can be used to select the
2017 Sep 25
1
Subset
Always via logical expressions. In this case you can use the logical expression
myDF$b != "0"
to give you a vector of TRUE/FALSE
B.
> On Sep 25, 2017, at 8:00 AM, Shane Carey <careyshan at gmail.com> wrote:
>
> This is super, really helpfull. Sorry, one final question, lets say I wanted to remove 0's rather than NAs , what would it be?
>
> Thanks
>
2017 Sep 25
0
Subset
This is super, really helpfull. Sorry, one final question, lets say I
wanted to remove 0's rather than NAs , what would it be?
Thanks
On Mon, Sep 25, 2017 at 12:41 PM, Boris Steipe <boris.steipe at utoronto.ca>
wrote:
> myDF <- data.frame(a = c("<0.1", NA, 0.3, 5, "Nil"),
> b = c("<0.1", 1, 0.3, 5, "Nil"),
>
2004 Jan 21
2
subset select within a function
Dear all,
I'd like to subset a df within a function, and use select for choosing
the variable. Something like (simplified example):
mydf <- data.frame(a= 0:9, b= 10:19)
ttt <- function(vv) {
tmpdf <- subset(mydf, select= vv)
mean(tmpdf$vv)
}
ttt(mydf$b)
But this is not the correct way. Any help?
Thanks in advance
Juli
2011 Sep 03
2
problem in applying function in data subset (with a level) - using plyr or other alternative are also welcome
Dear R experts.
I might be missing something obvious. I have been trying to fix this problem
for some weeks. Please help.
#data
ped <- c(rep(1, 4), rep(2, 3), rep(3, 3))
y <- rnorm(10, 8, 2)
# variable set 1
M1a <- sample (c(1, 2,3), 10, replace= T)
M1b <- sample (c(1, 2,3), 10, replace= T)
M1aP1 <- sample (c(1, 2,3), 10, replace= T)
M1bP2 <- sample (c(1, 2,3), 10, replace= T)
2024 May 09
2
Strange variable names in factor regression
On converting character variables to ordered factors, regression result
has strange names. Is it possible to obtain same variable names with
and without intercept?
Thanks,
Naresh
mydf <- data.frame(date = seq.Date(as.Date("2024-01-01"),
as.Date("2024-03-31"), by = 1))
mydf[, "wday"] <- weekdays(mydf$date, abbreviate = TRUE)
mydf.work <- subset(mydf, !(wday
2011 May 19
1
Creating a "shifted" month (one that starts not on the first of each month but on another date)
Hello!
I have a data frame with dates. I need to create a new "month" that
starts on the 20th of each month - because I'll need to aggregate my
data later by that "shifted" month.
I wrote the code below and it works. However, I was wondering if there
is some ready-made function in some package - that makes it
easier/more elegant?
Thanks a lot!
# Example data:
2006 Apr 17
3
Subset dataframe based on condition
Hi,
I am trying to extract subset of data from my original data frame based on some condition. For example : (mydf -original data frame, submydf - subset dada frame)
>submydf = subset(mydf, a > 1 & b <= a),
here column a contains values ranging from 0.01 to 100000. I want to extract only those matching condition 1 i.e a > . But when i execute this command it is
2004 Sep 02
2
Polycom Microbrowser
I have just spent the morning playing around with a Polycom IP600's
microbrowser. Everything is working pretty well. In answer to the
question of what type of XML it runs, it appears to be more or less
XHTML-compliant. I have created a basic set of web pages allowing users
to clock in and out against our MySQL timeclock system, running a PHP
back-end. It's running like a champ.
2007 Sep 01
2
Comparing "transform" to "with"
Hi All,
I've been successfully using the with function for analyses and the
transform function for multiple transformations. Then I thought, why not
use "with" for both? I ran into problems & couldn't figure them out from
help files or books. So I created a simplified version of what I'm
doing:
rm( list=ls() )
x1<-c(1,3,3)
x2<-c(3,2,1)
x3<-c(2,5,2)