Displaying 20 results from an estimated 70000 matches similar to: "Looping and actual variable names"
2009 Nov 03
8
recommend benchmarking SW
Hey folks,
We've got some new hardware and are trying to figure out what best to
do with it. Either run CentOS right on the bare metal, or
virtualize, or several combination options. Mainly looking at :
- CentOS on bare metal
- CentOS on ESXi 4.0 with local disk
- CentOS on ESXi with 1 VM running Openfiler to serve disk to other VMs
And want to benchmark these 3 scenarios
So far all we
2002 Apr 04
1
PR#1132.
Just now I again had occasion to want nested describe lists in a
documentation file. I found that the bug which I reported on 18
October, 2001 still persists. I checked on the bug report at the R
web page, and found that the notes say ``Not a problem in R 1.4.0
(2001-12-08)''.
Well, it's still a problem for me --- using R 1.4.1.
(Details:
platform sparc-sun-solaris2.7
arch
2010 Sep 08
2
big data
Hello,
I searched the internet but i didn't find the answer for the next problem:
I want to do a glm on a csv file consisting of 25 columns and 4 mln rows.
Not all the columns are relevant. My problem is to read the data into R.
Manipulate the data and then do a glm.
I've tried with:
dd<-scan("myfile.csv",colClasses=classes)
dat<-as.data.frame(dd)
My question is: what
2008 May 12
1
Insert a recorde into a table using SQL
Dear list,
I want to insert a recorde into a SQLite table by dbGetQuery(), but
there is a problem when the value contains quotation mark.
> dd<-data.frame(txt=c("having both ' and \" in character.","OK"))
> library(RSQLite)
Loading required package: DBI
> con<-dbConnect(dbDriver("SQLite"),":memory:")
>
2009 Sep 27
2
mounting images created using dd that contain two partitions
Hi all,
I am trying to mount images that I previously created with dd and the
images have two partitions (swap and LVM). I use these images to house
data for my Xen Guests.
For some reason (possibly Kernel conflicts for paravirtualized
domains) I am unable to boot my Guest images. Failing which I would
like to mount the disk images and atleast get my data out of them.
dd -o loop server.img
2023 Nov 07
1
make a lattice dotplot with symbol size proportional to a variable in the plotted dataframe
Hello. My question is in the subject line. Using R 4.1.3 on Windows 10.
Commented MWE below. Thanks.
--Chris Ryan
library(dplyr)
library(lattice)
## fabricate a dataframe
dd <- data.frame(agency = sample(LETTERS, size = 5),
total = sample(100:200, size = 5),
las = sample(20:40, size = 5))
dd <- dd %>% mutate(proportion = las/total, bubble = total/100)
## attempt to make a dotplot
2018 Mar 07
3
Names of variables needed in newdata for predict.glm
I would like to extract the names, modes [numeric/factor] and levels
of variables needed in a data frame supplied as newdata= argument to
predict.glm()
Here is a small example illustrating my troubles; what I want from
(both of) the glm objects is the vector c("x","f","Y") and an
indication that f is a factor:
library( splines )
dd <- data.frame( D =
2018 Mar 08
0
Names of variables needed in newdata for predict.glm
Hi,
Some try:
> names(mi$xlevels)
[1] "f"
> all.vars(mi$formula)
[1] "D" "x" "f" "Y"
> names(mx$xlevels)
[1] "f"
> all.vars(mx$formula)
[1] "D" "x" "f"
When offset is indicated out of the formula, it does not work...
Marc
Le 07/03/2018 ? 06:20, Bendix Carstensen a ?crit?:
> I would like
2017 Oct 25
1
as.data.frame doesn't set col.names
Hi Peter,
Thanks for contributing such a great answer. Can you please provide a
pointer to the documentation where it explains why dd$B <- s and dd["B"] <-
s have such different behavior?
(I am perfectly happy if you write the explanation but if it saves you time
to point to some reference that works fine for me.)
Regards,
Eric
On Wed, Oct 25, 2017 at 2:27 PM, Peter Dalgaard
2015 Oct 26
2
Still fighting localboot on EFI - looping
On 10/26/2015 1:46 PM, Geert Stappers via Syslinux wrote:
> On Mon, Oct 26, 2015 at 12:09:40PM -0600, Alan Sparks via Syslinux wrote:
>> I'm still trying fruitlessly to get some sort of local disk boot from
>> syslinux EFI to work... using the 6.03 modules. Tried various
>> combinations of configurations on Gene's test binaries.
>
> The test binariers Gene
2017 Oct 25
0
as.data.frame doesn't set col.names
> On 24 Oct 2017, at 22:45 , David L Carlson <dcarlson at tamu.edu> wrote:
>
> You left out all the most important bits of information. What is yo? Are you trying to assign a data frame to a single column in another data frame? Printing head(samples) tells us nothing about what data types you have, especially if the things that look like text are really factors that were created
2018 Mar 31
1
Names of variables needed in newdata for predict.glm
all.vars works fine, EXCEPT, it give a bit too much.
I only want the regression variables, but in the following example I also get "k" the variable holding the chosen knots. Any machinery to find only "real" regression variables?
cheers, Bendix
library( splines )
y <- rnorm(100)
x <- rnorm(100)
k <- -1:1
ml <- lm( y ~ bs(x,knots=k) )
mg <- glm( y ~
2005 Dec 06
2
how to extract row& col names from a matrix
Dear all,
I like to extract row names & column names from the named matrix......
like......
a<-matrix(1:6,2)
ro<-c("aa","bb")
co<-c("dd","ee","ff")
dimnames(a)<-list(ro,co)
a
>
dd ee ff
aa 1 3 5
bb 2 4 6
from the above matrix "a"
I like to extract
rownames separately like
2011 Feb 02
4
looping variable names
Hi all,
I've been looking for a simple answer to the following problem.
Let's say that I can loop through, say, 100 values that need to be assigned
to, say, the variables var1:var100.
Is there an elegant way to do this?
I have seen one or two similar questions...but they tend to be in more
complicated contexts.
Simple question, hopefully with a simple answer.
Thanks very much!
--
2015 Oct 26
5
Still fighting localboot on EFI - looping
I'm still trying fruitlessly to get some sort of local disk boot from
syslinux EFI to work... using the 6.03 modules. Tried various
combinations of configurations on Gene's test binaries.
For reference this is on different models of HP Proliant Gen-9 systems
with UEFI. Firmware as up to date as it comes. The UEFI boot order
has the hard drives and OS ESPs before the PXE interfaces
2007 Nov 28
3
using names with functions..
Dear all,
I have the following (rather) strange problem..
For some reasons, I finally work with a variable whose name includes an
R function, "a.log(z)", say. And that is a problem when I call it in a
formula, for instance:
> myname<-"a.log(z)"
> dd<-data.frame("a.log(z)"=1:10,y=rnorm(10))
> o<-lm(y~1,data=dd)
>
2010 Mar 16
2
Conditional variable assignment
Hi everyone,
Once again I am stuck with a problem I can't seem to figure out. I suppose this learning curve levels off eventually, lol. I am learning on my own with absolutely no background in programming, so if I seem to request help a lot it's not because I am seeking others to do the work for me. I need to assign one of two arrival times to the 'ARRIVE' variable of my
2011 Jul 05
1
if else loop
Dear R help
I was hoping you might be able to show me how to write a loop function take
would ccomplish this task.
library(prob)
{
a <- sample ( 1:20, 100, replace=T)
b<-sample(5:24,100,replace=T)
}
dd <- data.frame(a,b)
dd
# code piece I am looking for
if(subset(dd,c(1,23,ordered=F))is found))( print subset)
else( continue evaluating subsets)
subset(dd,isin(dd,c(1,23), ordered =
2010 Mar 15
1
Assigning a sequence to a subsetted data frame variable
Hey folks,
I have a difficult (at least for me) problem that I was hoping
one of you may know how to solve. I want to assign a sequence
to subsets of a variable in a data frame based on date.
The variable is 'SITE1' and the date is a unique day (DD) and
month (MM) combination. The sequence contains site numbers 101:104,
and each day-month combination takes four site numbers from that
2010 Mar 04
1
only actual variable names in all.names()
dear all,
When I use all.vars(), I am interest in extracting only the variable names..
Here a simple example
all.vars(as.formula(y~poly(x,k)+z))
returns
[1] "y" "x" "k" "z"
and I would like to obtain
"y" "x" "z"
Where is the trick?
many thanks
vito
--
====================================
Vito M.R. Muggeo
Dip.to Sc