Displaying 20 results from an estimated 1000 matches similar to: "Coercing a list of variables in a function call"
2008 Dec 12
2
Extracting the name of an object into a character string and vice versa
I am still struggling to map a character string to an object name and
vice versa in R.
I thought the as.name() function might work, but observe the following
behaviour ...
> attach(warpbreaks)
> levels(tension)
[1] "L" "M" "H"
> levels(as.name("tension"))
NULL
> objectname<-as.name("tension")
> objectname
tension
>
2010 Jul 16
1
Packages built before R 2.10.0
Dear list,
I am running R2.11.1 on 32 bit windows. I am receiving messages as
follows ...
> require(car)
Loading required package: car
Error: package 'car' was built before R 2.10.0: please re-install it
The package kohonen was another example.
This failure appears to be fatal and not only affects the package
concerned, but also all its dependents.
Is there anything I can do at my
2009 Jan 30
1
Using Rscript
Dear List,
Hopefully someone will point me to a piece of documentation that I have
overlooked.
I am running Rscript successfully to read and execute an R program, but
have failed
to find the correct syntax to route the output to a file using the
Rscript command that invokes
the job. I tried Rscript -e 'sink("outputfile")' script.R , but it then
ignored the scriptfile.
I know
2009 Apr 02
2
Environments
Dear List,
No doubt I am going around this the wrong way, and hopefully one of you
will be able to tell me how to go about it the right way.
I want to change the names of an object inside a function and have it
stay changed in the global environment. I can only
effect the change inside the function as follows ...
>
2008 Dec 11
5
Extracting the name of an object into a character string
Dear List,
I am writing a function in R with the facility to store models for later
use in scoring.
It would be very useful if I could include in the name of the file
stored the name of
the model object being stored, this name being chosen by the user in the
function
call. A simple function to store the name of an object as a character
string would fit the
bill, but I have not found one. name()
2010 Mar 16
0
Ensembles in cforest
Dear List,
I'm trying to find a way to extract the individual conditional inference
trees from cforest ( a modelling function in the party package) in a
manner analogous to
getTree in randomForest and I'm struggling. I can see that the
information is held within the ensemble list, but haven't been able to
work out how this sequence
of nested lists is structured or if any of the items
2008 Nov 06
0
Queries about step() and stepAIC()
I have been learning how to use these functions and would like to know
the following as
I have so far been unable to find the answers in the documentation.
1) What stopping rules are used ?
2) Can the stopping rules be changed?
3) Can the results of each step be stored as objects in R and if so how
?
4) Is there a worked example somewhere of using the keep= argument ?
Many thanks in
2005 Mar 14
7
Voicemail SMS Alert - Possible?
I need to be able to send an sms alert to one's mobile/cell phone. For
instance, when I receive a voicemail message in my inbox, I also want to
be able to get a message on my cell phone alerting me of this e-mail. How
possible is this? And if it is, what do I need to do to get the service up
and running?
Ideas are most welcome.
Thanks,
Julius.
2005 Mar 24
5
* -> SMS w/out PSTN
Hi all
I have been googling and wiki-ing and have found a number of potential
solutions to my questions, but I don't want to have to play about for too
long and risk messing up my * box now I've just got it working, if one of
you kind folk could offer your 2 penneth, (being a Brit I'll have none of
this cents business ;] ).
I want to send an SMS message whenever I get a voicemail
2005 Sep 09
0
CUPS username case wrong from Windows 98 client
I have a problem getting Windows 98 clients printing to CUPS printers
where I have the printer access allowed/denied by username. It appears
that samba is passing the username in uppercase to CUPS as the owner of
the printjob and then CUPS does not recognise that username and rejects
the job. It all works under Windows NT/XP.
I am running samba 3.0.20 and cups 1.1.23. The smb.conf file is below
2005 Feb 28
0
New SMS gateway command
I thought it might be of interest to the group to pass on information about
a replacement SMS command we have developed for sending text messages from
Asterisk.
The FASTSMS command will route text messages to mobile phones in 154
countries. Applications include voicemail notifications, missed call alerts,
automated text receipts for callers (e.g. call reference number), system
alerts, etc, etc.
2008 Nov 24
3
count the cumulative for each subject
I have a data set like the following:
subject visit x1
1 1 0.5
1 2 1.2
1 3 0.7
2 1 0.4
2 2 0.6
2 3 1.0
.....
where x1 is the interval between the two visits. Now I want to calculate the
cumulative intervals since the beinging, for example
subject visit x1 cum
1 1 0.5 0.5
1 2 1.2 0.5+1.2
1 3 0.7 0.5+1.2+0.7
2 1 0.4 0.4
2 2 0.6 0.4+0.6
2 3 1.0 0.4+0.6+1.0
.....
is there an easy to generate the
2010 Feb 12
2
Moving PDC from Fedora to RHEL5 - _net_auth2: creds_server_check failed. Rejecting auth request from client
Hi,
I'm in need of some help with moving a Samba PDC with LDAP backend from
Fedora linux to RHEL. The DNS is also running on that server and needs
to be moved also. The DNS and LDAP migration was simple enough. The new
server works just fine when using it's own DNS and LDAP for
authentication, and all the users appear to be intact after the LDAP
import. nss_ldap is working just fine.
2008 Feb 15
2
Joining a Windows XP pc to Samba / LDAP domain
Hi, guys,
I'm trying to create a PDC using Samba with an LDAP backend. According
to all the guides I read, this should be fairly easy really, but I've
done nothing else for the last week and it still doesn't work the way
the manual says it should! As far as I can see, everything is set up and
working correctly right up to the point when I try and join a machine to
the domain.
2006 Dec 30
3
getting a new factor
Hi all,
Given a data frame as...
> head(veg)
genus species trophia type geo zone importance
1 Sphagnum subsecundum M A En 100
2 Sphagnum denticulatum M A En 200
3 Molinia caerulea M A En 300
4 Sphagnum flexuosum M A En 400
5 Juncus squarrosus M A En 500
6
2008 Apr 23
1
S4 default for coercing
Something has changed in the S4 default for coercing. Am I now suppose
to use setAs, or is there something else I should do to make this work:
R version 2.7.0 (2008-04-22)
....
> require("methods")
> setClassUnion("OptionalPOSIXct", c("POSIXct", "NULL"))
[1] "OptionalPOSIXct"
> setClass("TSmetax",
2011 Jul 20
3
Coercing Logical array to Numeric array
Dear all,
Coercing a logical vector to a numeric one is easy. The as.numeric function is used. However what do we use when we have a matrix or an array?
Sumona
2006 Nov 29
1
Matrix*vector: coercing sparse to dense matrix for arithmetic
Hi,
I have a sparse Matrix (kronecker product of spline design matrices),
and I need to multiply each row by a number to get another matrix. If
the matrix is A and the numbers are stored in a vector k, with plain
vanilla matrices I would do
A*k
But when using the Matrix package (class of A is "dgCMatrix"), I get
the warning "coercing sparse to dense matrix for arithmetic".
2013 Jan 23
1
problems with coercing a factor to be numeric
Dear R listers,
I am trying to compute the mean of a dummy variable that is encoded as a
factor. However, even though the levels of my factor are 0 - 1, when I
compute the mean (after coercing the factor to be
numeric), R changes 0 into 1 and 1 into yes, thus altering my expected
result.
Please, consider the following working example:
pp <- rep(0:1, 10)
pp <- factor(pp, levels=(0:1),
2013 Feb 08
2
Coercing of types when raising a number to a series of powers
I'm trying to produce a series of powers of a number as follows:
|> 0.05^0:5
[1] 1 2 3 4 5
This is not the result I expected. I guess some kind of coercion happened,
since,
|> class(0.05^0:5)
[1] "integer"
Could anyone explain me what is happening here?
Thanks,
-Sergio.